diff --git a/wallpaper/devtools_options.yaml b/wallpaper/devtools_options.yaml new file mode 100644 index 0000000..7e7e7f6 --- /dev/null +++ b/wallpaper/devtools_options.yaml @@ -0,0 +1 @@ +extensions: diff --git a/wallpaper/ios/Flutter/Debug.xcconfig b/wallpaper/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/wallpaper/ios/Flutter/Debug.xcconfig +++ b/wallpaper/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/wallpaper/ios/Flutter/Release.xcconfig b/wallpaper/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/wallpaper/ios/Flutter/Release.xcconfig +++ b/wallpaper/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/wallpaper/ios/Podfile b/wallpaper/ios/Podfile new file mode 100644 index 0000000..d97f17e --- /dev/null +++ b/wallpaper/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/wallpaper/ios/Podfile.lock b/wallpaper/ios/Podfile.lock new file mode 100644 index 0000000..041a85b --- /dev/null +++ b/wallpaper/ios/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - Flutter (1.0.0) + - flutter_keyboard_visibility (0.0.1): + - Flutter + +DEPENDENCIES: + - Flutter (from `Flutter`) + - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + flutter_keyboard_visibility: + :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" + +SPEC CHECKSUMS: + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 + +PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 + +COCOAPODS: 1.15.2 diff --git a/wallpaper/ios/Runner.xcodeproj/project.pbxproj b/wallpaper/ios/Runner.xcodeproj/project.pbxproj index 35feba8..f21fa51 100644 --- a/wallpaper/ios/Runner.xcodeproj/project.pbxproj +++ b/wallpaper/ios/Runner.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1381E215FCD6A5260C4A35D5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34F5AEAC9A26B0A83AF64ED8 /* Pods_Runner.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; @@ -14,6 +15,7 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + BEE944224E40C81C5697A99D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 306E98EAA977448509EED1C5 /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,12 +44,17 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 2502563898FB261B809E8C44 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 306E98EAA977448509EED1C5 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 34F5AEAC9A26B0A83AF64ED8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 6E0B90E6E3E527B3017A4C3B /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 91E756A83D51EF73930DECC6 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -55,19 +62,40 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C7F20F33E41424FB4033B9D9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + E61A27230A23F3626A2584D3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + F8A7AFE61E77B491119ECA54 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 70D8A834B42D09A6E3B3A8CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BEE944224E40C81C5697A99D /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 1381E215FCD6A5260C4A35D5 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 29541A18331CE1E7B2E6714D /* Frameworks */ = { + isa = PBXGroup; + children = ( + 34F5AEAC9A26B0A83AF64ED8 /* Pods_Runner.framework */, + 306E98EAA977448509EED1C5 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 331C8082294A63A400263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( @@ -94,6 +122,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, + F6B2829F4779EED37D9BC1CC /* Pods */, + 29541A18331CE1E7B2E6714D /* Frameworks */, ); sourceTree = ""; }; @@ -121,6 +151,20 @@ path = Runner; sourceTree = ""; }; + F6B2829F4779EED37D9BC1CC /* Pods */ = { + isa = PBXGroup; + children = ( + 6E0B90E6E3E527B3017A4C3B /* Pods-Runner.debug.xcconfig */, + C7F20F33E41424FB4033B9D9 /* Pods-Runner.release.xcconfig */, + E61A27230A23F3626A2584D3 /* Pods-Runner.profile.xcconfig */, + 91E756A83D51EF73930DECC6 /* Pods-RunnerTests.debug.xcconfig */, + F8A7AFE61E77B491119ECA54 /* Pods-RunnerTests.release.xcconfig */, + 2502563898FB261B809E8C44 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -128,8 +172,10 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + 1008F8827994B5C0D1968E5D /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, + 70D8A834B42D09A6E3B3A8CD /* Frameworks */, ); buildRules = ( ); @@ -145,12 +191,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + D5A309A3DE23BB1553C5D5DA /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 1837FA0438060A6FD937588B /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -222,6 +270,45 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 1008F8827994B5C0D1968E5D /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 1837FA0438060A6FD937588B /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -253,6 +340,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + D5A309A3DE23BB1553C5D5DA /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -379,6 +488,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 91E756A83D51EF73930DECC6 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -396,6 +506,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = F8A7AFE61E77B491119ECA54 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -411,6 +522,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 2502563898FB261B809E8C44 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; diff --git a/wallpaper/ios/Runner.xcworkspace/contents.xcworkspacedata b/wallpaper/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/wallpaper/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/wallpaper/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/wallpaper/lib/MyApp.dart b/wallpaper/lib/MyApp.dart new file mode 100644 index 0000000..217d969 --- /dev/null +++ b/wallpaper/lib/MyApp.dart @@ -0,0 +1,78 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + + +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:wallpaper/routes/app_routes.dart'; + + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'WallPaper', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const RootPage(title: 'Flutter Demo Home Page'), + ); + } +} + +class RootPage extends StatefulWidget { + const RootPage({super.key, required this.title}); + final String title; + + @override + State createState() => _RootPageState(); +} + +class _RootPageState extends State { + @override + Widget build(BuildContext context) { + return ScreenUtilInit( + builder: (context,widget) { + return GetMaterialApp( + title: "WallPaper", + theme: ThemeData.light(useMaterial3: true).copyWith( + primaryColor: Color(0xFFFF9000), + ), + themeMode: ThemeMode.light, + getPages: AppRoutes.routes, + initialRoute: AppRoutes.initialPage, + builder: (context,widget) { + return DefaultTabController( + length: 3, + child: Scaffold( + bottomNavigationBar: AppBar( + bottom: const TabBar( + tabs: [ + Tab(icon: Icon(Icons.directions_car),), + Tab(icon: Icon(Icons.directions_bike),), + Tab(icon: Icon(Icons.directions_train),), + ], + ), + title: const Text("WallPaper tab"), + ), + body: const TabBarView( + children: [ + Center( + child: Text("fdsssssaj"), + ), + Icon(Icons.directions_bike), + Icon(Icons.directions_train), + ], + ), + ), + ); + }, + ); + }, + ); + } +} diff --git a/wallpaper/lib/TestApp.dart b/wallpaper/lib/TestApp.dart new file mode 100644 index 0000000..13b168f --- /dev/null +++ b/wallpaper/lib/TestApp.dart @@ -0,0 +1,63 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:provider/provider.dart'; +class BottomNavigationBarLnt extends StatefulWidget { + const BottomNavigationBarLnt({super.key}); + + @override + State createState() => _BottomNavigationBarLntState(); +} + +class _BottomNavigationBarLntState extends State{ + + int _cuurentIndex = 0; + + + @override + Widget build(BuildContext context) { + final List chiledList = [Center(child: const Text("sfdajl",style: TextStyle(color: Colors.red),),),const Text("aaa"),const Text("eeee"),const Text("rrrr")]; + + final List listItem = [ + const BottomNavigationBarItem( + icon: Icon(Icons.home), + label: "Home" + ), + const BottomNavigationBarItem( + icon: Icon(Icons.book), + label: "Collection" + ), + const BottomNavigationBarItem( + icon: Icon(Icons.music_video), + label: "My" + ), + const BottomNavigationBarItem( + icon: Icon(Icons.movie), + label: "Setting" + ), + ]; + + + return MaterialApp( + home: Scaffold( + bottomNavigationBar: BottomNavigationBar( + items: listItem, + // fixedColor: Colors.blue, + unselectedItemColor:Colors.grey, + selectedItemColor: Colors.orange, + type: BottomNavigationBarType.fixed, + selectedFontSize: 14, + unselectedFontSize: 14, + currentIndex: _cuurentIndex, + onTap: _onItemTapped, + ), + body: chiledList[_cuurentIndex], + ), + ); + } + + void _onItemTapped(int index) { + setState(() { + _cuurentIndex = index; + }); + } +} diff --git a/wallpaper/lib/WallPaperApp.dart b/wallpaper/lib/WallPaperApp.dart new file mode 100644 index 0000000..94a2a0d --- /dev/null +++ b/wallpaper/lib/WallPaperApp.dart @@ -0,0 +1,73 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + + +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import 'package:wallpaper/routes/app_routes.dart'; +import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; + + +class WallPaperApp extends StatefulWidget { + @override + const WallPaperApp({super.key}); + + @override + State createState() => _WallPaperAppState(); +} + +class _WallPaperAppState extends State { + @override + Widget build(BuildContext context){ + return MaterialApp( + title: 'wall paper', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange), + useMaterial3: true, + ), + home: const RootWidget(title:'root widget title'), + ); + } +} + +class RootWidget extends StatefulWidget { + @override + const RootWidget({super.key,required this.title}); + final String title; + @override + State createState() => _RootWidgetState(); +} + +class _RootWidgetState extends State { + @override + Widget build(BuildContext context) { + final easyLoading = EasyLoading.init(); + + return ScreenUtilInit( + builder: (context,widget){ + return GetMaterialApp( + title:'Getmaterial app title', + theme: ThemeData.light(useMaterial3: true).copyWith( + primaryColor: Colors.blue, + ), + themeMode: ThemeMode.light, + getPages: AppRoutes.routes, + initialRoute: AppRoutes.initialPage, + builder: (context,widget){ + return MediaQuery( + // 设置文字大小不随系统设置改变 + data: MediaQuery.of(context).copyWith(textScaler: TextScaler.noScaling), + child: KeyboardDismissOnTap( + // 点击其他交互式组件,也关闭键盘 + dismissOnCapturedTaps: true, + child: easyLoading(context, widget), + ), + ); + }, + ); + }, + ); + } +} \ No newline at end of file diff --git a/wallpaper/lib/main.dart b/wallpaper/lib/main.dart index 8e94089..d29eae6 100644 --- a/wallpaper/lib/main.dart +++ b/wallpaper/lib/main.dart @@ -1,125 +1,11 @@ import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + +import 'MyApp.dart'; + +import 'TestApp.dart'; void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({super.key}); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a purple toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - useMaterial3: true, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // TRY THIS: Try changing the color here to a specific color (to - // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar - // change color while the other colors stay the same. - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - // - // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" - // action in the IDE, or press "p" in the console), to see the - // wireframe for each widget. - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. - ); - } + runApp(const BottomNavigationBarLnt()); + // runApp(const MyApp()); } diff --git a/wallpaper/lib/pages/homepage/homepage_binding.dart b/wallpaper/lib/pages/homepage/homepage_binding.dart new file mode 100644 index 0000000..1f2ba8f --- /dev/null +++ b/wallpaper/lib/pages/homepage/homepage_binding.dart @@ -0,0 +1,11 @@ +import 'package:get/get.dart'; + +import 'homepage_controller.dart'; + +class HomePageBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => HomePageController()); + } + +} \ No newline at end of file diff --git a/wallpaper/lib/pages/homepage/homepage_controller.dart b/wallpaper/lib/pages/homepage/homepage_controller.dart new file mode 100644 index 0000000..f3854d2 --- /dev/null +++ b/wallpaper/lib/pages/homepage/homepage_controller.dart @@ -0,0 +1,5 @@ +import 'package:get/get.dart'; + +class HomePageController extends GetxController { + +} \ No newline at end of file diff --git a/wallpaper/lib/pages/homepage/homepage_view.dart b/wallpaper/lib/pages/homepage/homepage_view.dart new file mode 100644 index 0000000..8ddb995 --- /dev/null +++ b/wallpaper/lib/pages/homepage/homepage_view.dart @@ -0,0 +1,18 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +class HomePageView extends GetView { + const HomePageView({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("首页"), + ), + body: const Center( + child: Text("xxxxx"), + ), + ); + } +} \ No newline at end of file diff --git a/wallpaper/lib/pages/tabarpage/tabarpage_binding.dart b/wallpaper/lib/pages/tabarpage/tabarpage_binding.dart new file mode 100644 index 0000000..9129870 --- /dev/null +++ b/wallpaper/lib/pages/tabarpage/tabarpage_binding.dart @@ -0,0 +1,11 @@ +import 'package:get/get.dart'; + +import 'tabarpage_controller.dart'; + +class TabbarPageBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut(() => TabbarPageController()); + } + +} \ No newline at end of file diff --git a/wallpaper/lib/pages/tabarpage/tabarpage_controller.dart b/wallpaper/lib/pages/tabarpage/tabarpage_controller.dart new file mode 100644 index 0000000..4a72404 --- /dev/null +++ b/wallpaper/lib/pages/tabarpage/tabarpage_controller.dart @@ -0,0 +1,9 @@ +import 'package:get/get.dart'; + +class TabbarPageController extends GetxController { + // TabbarPageController + @override + void onInit(){ + super.onInit(); + } +} \ No newline at end of file diff --git a/wallpaper/lib/pages/tabarpage/tabarpage_view.dart b/wallpaper/lib/pages/tabarpage/tabarpage_view.dart new file mode 100644 index 0000000..b10cbb4 --- /dev/null +++ b/wallpaper/lib/pages/tabarpage/tabarpage_view.dart @@ -0,0 +1,19 @@ + +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +class TabbarPageView extends GetView { + const TabbarPageView({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text("首页"), + ), + body: const Center( + child: Text("xxxxx"), + ), + ); + } +} \ No newline at end of file diff --git a/wallpaper/lib/routes/app_routes.dart b/wallpaper/lib/routes/app_routes.dart new file mode 100644 index 0000000..b325904 --- /dev/null +++ b/wallpaper/lib/routes/app_routes.dart @@ -0,0 +1,29 @@ +import 'package:wallpaper/pages/homepage/homepage_binding.dart'; +import 'package:wallpaper/pages/homepage/homepage_view.dart'; + +import 'package:wallpaper/pages/tabarpage/tabarpage_binding.dart'; +import 'package:wallpaper/pages/tabarpage/tabarpage_view.dart'; + +import 'package:get/get.dart'; + +class AppRoutes { + AppRoutes._(); + static const initialPage = '/home'; + + static final routes= [ + GetPage( + name: 'home', + page: ()=> const HomePageView(), + binding: HomePageBinding(), + participatesInRootNavigator: true, + ), + // GetPage( + // name: initialPage, + // page: ()=> const TabbarPageView(), + // binding: TabbarPageBinding(), + // participatesInRootNavigator: true, + // ) + + ]; + +} \ No newline at end of file diff --git a/wallpaper/macos/Flutter/Flutter-Debug.xcconfig b/wallpaper/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b..4b81f9b 100644 --- a/wallpaper/macos/Flutter/Flutter-Debug.xcconfig +++ b/wallpaper/macos/Flutter/Flutter-Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/wallpaper/macos/Flutter/Flutter-Release.xcconfig b/wallpaper/macos/Flutter/Flutter-Release.xcconfig index c2efd0b..5caa9d1 100644 --- a/wallpaper/macos/Flutter/Flutter-Release.xcconfig +++ b/wallpaper/macos/Flutter/Flutter-Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/wallpaper/macos/Podfile b/wallpaper/macos/Podfile new file mode 100644 index 0000000..c795730 --- /dev/null +++ b/wallpaper/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '10.14' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/wallpaper/pubspec.lock b/wallpaper/pubspec.lock index c3eee58..0bff9f5 100644 --- a/wallpaper/pubspec.lock +++ b/wallpaper/pubspec.lock @@ -62,6 +62,62 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_easyloading: + dependency: "direct main" + description: + name: flutter_easyloading + sha256: ba21a3c883544e582f9cc455a4a0907556714e1e9cf0eababfcb600da191d17c + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.5" + flutter_keyboard_visibility: + dependency: "direct main" + description: + name: flutter_keyboard_visibility + sha256: "98664be7be0e3ffca00de50f7f6a287ab62c763fc8c762e0a21584584a3ff4f8" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.0.0" + flutter_keyboard_visibility_linux: + dependency: transitive + description: + name: flutter_keyboard_visibility_linux + sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" + flutter_keyboard_visibility_macos: + dependency: transitive + description: + name: flutter_keyboard_visibility_macos + sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" + flutter_keyboard_visibility_platform_interface: + dependency: transitive + description: + name: flutter_keyboard_visibility_platform_interface + sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" + flutter_keyboard_visibility_web: + dependency: transitive + description: + name: flutter_keyboard_visibility_web + sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" + flutter_keyboard_visibility_windows: + dependency: transitive + description: + name: flutter_keyboard_visibility_windows + sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" flutter_lints: dependency: "direct dev" description: @@ -70,11 +126,40 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.0.2" + flutter_screenutil: + dependency: "direct main" + description: + name: flutter_screenutil + sha256: "8cf100b8e4973dc570b6415a2090b0bfaa8756ad333db46939efc3e774ee100d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.9.0" + flutter_spinkit: + dependency: transitive + description: + name: flutter_spinkit + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.2.1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + get: + dependency: "direct main" + description: + name: get + sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.6.6" leak_tracker: dependency: transitive description: @@ -131,6 +216,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.11.0" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" path: dependency: transitive description: @@ -139,6 +232,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.9.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.8" + provider: + dependency: "direct main" + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.1.2" sky_engine: dependency: transitive description: flutter @@ -210,3 +319,4 @@ packages: version: "13.0.0" sdks: dart: ">=3.3.4 <4.0.0" + flutter: ">=3.13.0" diff --git a/wallpaper/pubspec.yaml b/wallpaper/pubspec.yaml index 82dc955..7b825ce 100644 --- a/wallpaper/pubspec.yaml +++ b/wallpaper/pubspec.yaml @@ -31,7 +31,18 @@ dependencies: flutter: sdk: flutter + # 状态管理、路由、依赖注入 + get: ^4.6.6 + provider: ^6.0.0 + # 屏幕和字体大小适配 + flutter_screenutil: ^5.9.0 + # 对键盘可见性变化做出反应 + flutter_keyboard_visibility: ^6.0.0 + + # 加载、进度、提示框 + flutter_easyloading: ^3.0.5 + # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6