diff --git a/circle_app/assets/images/base/bg.png b/circle_app/assets/images/base/bg.png index 08b5560..67960bc 100644 Binary files a/circle_app/assets/images/base/bg.png and b/circle_app/assets/images/base/bg.png differ diff --git a/circle_app/assets/images/login/desc_bg.png b/circle_app/assets/images/login/desc_bg.png new file mode 100644 index 0000000..8ea0dc7 Binary files /dev/null and b/circle_app/assets/images/login/desc_bg.png differ diff --git a/circle_app/assets/images/login/edit.png b/circle_app/assets/images/login/edit.png new file mode 100644 index 0000000..5dadc0b Binary files /dev/null and b/circle_app/assets/images/login/edit.png differ diff --git a/circle_app/assets/images/login/start_bg.png b/circle_app/assets/images/login/start_bg.png new file mode 100644 index 0000000..1f6d4f6 Binary files /dev/null and b/circle_app/assets/images/login/start_bg.png differ diff --git a/circle_app/ios/Flutter/Debug.xcconfig b/circle_app/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/circle_app/ios/Flutter/Debug.xcconfig +++ b/circle_app/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/circle_app/ios/Flutter/Release.xcconfig b/circle_app/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/circle_app/ios/Flutter/Release.xcconfig +++ b/circle_app/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/circle_app/ios/Podfile b/circle_app/ios/Podfile new file mode 100644 index 0000000..88359b2 --- /dev/null +++ b/circle_app/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '11.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__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/circle_app/ios/Podfile.lock b/circle_app/ios/Podfile.lock new file mode 100644 index 0000000..23a67c9 --- /dev/null +++ b/circle_app/ios/Podfile.lock @@ -0,0 +1,35 @@ +PODS: + - Flutter (1.0.0) + - fluttertoast (0.0.2): + - Flutter + - Toast + - image_picker_ios (0.0.1): + - Flutter + - Toast (4.0.0) + +DEPENDENCIES: + - Flutter (from `Flutter`) + - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) + - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) + +SPEC REPOS: + trunk: + - Toast + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + fluttertoast: + :path: ".symlinks/plugins/fluttertoast/ios" + image_picker_ios: + :path: ".symlinks/plugins/image_picker_ios/ios" + +SPEC CHECKSUMS: + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c + image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 + Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 + +PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 + +COCOAPODS: 1.11.3 diff --git a/circle_app/ios/Runner.xcodeproj/project.pbxproj b/circle_app/ios/Runner.xcodeproj/project.pbxproj index 87a2592..e6e71e5 100644 --- a/circle_app/ios/Runner.xcodeproj/project.pbxproj +++ b/circle_app/ios/Runner.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 22CFB7F8CFF7C02B435817DE /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 64745BC4460235A00175F5A2 /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -32,8 +33,10 @@ 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 = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 64745BC4460235A00175F5A2 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 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 = ""; }; + 78B9F60BE100248DF35D1C4A /* 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 = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.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 = ""; }; @@ -42,6 +45,8 @@ 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 = ""; }; + AC1C6A539C9837988AF2A495 /* 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 = ""; }; + F32198389E732367AD9E8C47 /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,6 +54,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 22CFB7F8CFF7C02B435817DE /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -72,6 +78,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + E88BA3E50B53CCF184970C55 /* Pods */, + D14EA70E93A64019CB6FF97E /* Frameworks */, ); sourceTree = ""; }; @@ -98,6 +106,25 @@ path = Runner; sourceTree = ""; }; + D14EA70E93A64019CB6FF97E /* Frameworks */ = { + isa = PBXGroup; + children = ( + 64745BC4460235A00175F5A2 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + E88BA3E50B53CCF184970C55 /* Pods */ = { + isa = PBXGroup; + children = ( + AC1C6A539C9837988AF2A495 /* Pods-Runner.debug.xcconfig */, + 78B9F60BE100248DF35D1C4A /* Pods-Runner.release.xcconfig */, + F32198389E732367AD9E8C47 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -105,12 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + A37C0AA62211F95AD4A4D561 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 596550B3B6FD4574F751EEF4 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -184,6 +213,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 596550B3B6FD4574F751EEF4 /* [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; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -199,6 +245,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + A37C0AA62211F95AD4A4D561 /* [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 */ @@ -299,8 +367,12 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; @@ -428,9 +500,13 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -451,8 +527,12 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.example.circleApp; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; diff --git a/circle_app/ios/Runner.xcworkspace/contents.xcworkspacedata b/circle_app/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/circle_app/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/circle_app/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/circle_app/ios/Runner/Info.plist b/circle_app/ios/Runner/Info.plist index 9e3b9de..d434b21 100644 --- a/circle_app/ios/Runner/Info.plist +++ b/circle_app/ios/Runner/Info.plist @@ -2,6 +2,12 @@ + NSCameraUsageDescription + 应用想要访问您的相机,用户设置头像/动态发布 + NSPhotoLibraryUsageDescription + 应用想要访问您的相册,用于设置头像/动态发布 + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName @@ -24,10 +30,14 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + UIApplicationSupportsIndirectInputEvents + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main + UIStatusBarStyle + UIStatusBarStyleLightContent UISupportedInterfaceOrientations UIInterfaceOrientationPortrait @@ -43,9 +53,5 @@ UIViewControllerBasedStatusBarAppearance - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - diff --git a/circle_app/lib/app/home/logic.dart b/circle_app/lib/app/home/logic.dart index 759ae99..db5e841 100644 --- a/circle_app/lib/app/home/logic.dart +++ b/circle_app/lib/app/home/logic.dart @@ -1,13 +1,24 @@ import 'package:circle_app/util/util.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'state.dart'; class HomeLogic extends GetxController { + + + int currentIndex = 0; + Widget currentPage = Container(color: Colors.red,); + final HomeState state = HomeState(); String getInfo () { return getBaseImage('image'); } + updateIndex(int index) { + currentIndex = index; + update(); + } } diff --git a/circle_app/lib/app/home/state.dart b/circle_app/lib/app/home/state.dart index 6953451..5613985 100644 --- a/circle_app/lib/app/home/state.dart +++ b/circle_app/lib/app/home/state.dart @@ -1,5 +1,10 @@ +import 'package:flutter/material.dart'; + class HomeState { + HomeState() { ///Initialize variables } + + } diff --git a/circle_app/lib/app/home/view.dart b/circle_app/lib/app/home/view.dart index c78fae9..464497e 100644 --- a/circle_app/lib/app/home/view.dart +++ b/circle_app/lib/app/home/view.dart @@ -1,5 +1,7 @@ +import 'package:circle_app/router/app_routers.dart'; import 'package:circle_app/util/util.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'logic.dart'; @@ -10,18 +12,77 @@ class HomePage extends StatelessWidget { final logic = Get.lazyPut(() => HomeLogic()); final state = Get.find().state; + final List _tabs = [ + Container(), + Container(), + Container(), + ]; + + final List _bottomTabs = [ + //icon部分的设置!!!! + BottomNavigationBarItem( + icon:Padding(padding: EdgeInsets.all(8), + child: Image.asset(getTabbarImage('msg_normal'),fit: BoxFit.cover,width: 25,height: 25)), + activeIcon:Padding(padding: EdgeInsets.all(8), + child: Image.asset(getTabbarImage('msg_selected'),fit: BoxFit.cover,width: 25,height: 25)), + label:'' + ), + BottomNavigationBarItem( + icon:Padding(padding: EdgeInsets.all(8), + child: Image.asset(getTabbarImage('circle_normal'),fit: BoxFit.cover,width: 25,height: 25)), + activeIcon:Padding(padding: EdgeInsets.all(8), + child: Image.asset(getTabbarImage('circle_selected'),fit: BoxFit.cover,width: 25,height: 25)), + label:'' + ), + BottomNavigationBarItem( + icon:Padding(padding: EdgeInsets.all(8), + child: Image.asset(getTabbarImage('mine_normal'),fit: BoxFit.cover,width: 25,height: 25)), + activeIcon:Padding(padding: EdgeInsets.all(8), + child: Image.asset(getTabbarImage('mine_selected'),fit: BoxFit.cover,width: 25,height: 25)), + label:'' + ) + ]; + @override Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage(getBaseImage("home_back")), - fit: BoxFit.fill, + return GetBuilder(builder: (HomeLogic controller) { + return GestureDetector( + onTap: () { + Get.toNamed(AppRoutes.Complete_materialPage); + }, + child: Scaffold( + // backgroundColor: Color.fromRGBO(244, 245, 245, 1.0), + bottomNavigationBar: Container( + height: Get.bottomBarHeight, + width: Get.width, + padding: EdgeInsets.only(left: 50.sp,right: 50.sp), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + funcItem(0, 'msg', 0 == controller.currentIndex, controller), + funcItem(1, 'circle', 1 == controller.currentIndex, controller), + funcItem(2, 'mine', 2 == controller.currentIndex, controller), + ], + ), + ), + body:_tabs[controller.currentIndex] ), + ); + }); + } + + funcItem(int index,String image,bool isSelected,HomeLogic controller) { + return GestureDetector( + onTap: () { + if (!isSelected) { + controller.updateIndex(index); + } + }, + child: Container( + child: Image.asset(isSelected ? getTabbarImage(image + '_selected') : getTabbarImage(image + '_normal'),width: 34.sp,height: 34.sp,), ), ); } - } diff --git a/circle_app/lib/app/login/complete_material/logic.dart b/circle_app/lib/app/login/complete_material/logic.dart index 119e315..cf0b8d5 100644 --- a/circle_app/lib/app/login/complete_material/logic.dart +++ b/circle_app/lib/app/login/complete_material/logic.dart @@ -1,7 +1,50 @@ +import 'package:circle_app/router/app_routers.dart'; +import 'package:circle_app/util/util.dart'; import 'package:get/get.dart'; +import 'package:image_picker/image_picker.dart'; import 'state.dart'; class Complete_materialLogic extends GetxController { final Complete_materialState state = Complete_materialState(); + final ImagePicker _picker = ImagePicker(); + + Future getImageFile() async { + try { + final XFile? pickedFile = await _picker.pickImage( + source: ImageSource.gallery, + ); + // setState(() { + // _setImageFileListFromFile(pickedFile); + // }); + } catch (e) { + // setState(() { + // _pickImageError = e; + // }); + } + } + + checkInfo() { + if (state.textEditingController.text.isEmpty) { + showToast('请输入您的昵称'); + } else if (state.sex.isEmpty) { + showToast('请选择您的属性'); + } else if (state.age.isEmpty) { + showToast('请选择您的年龄'); + } else if (state.role.isEmpty) { + showToast('请选择您的角色'); + } else if (state.role.isEmpty) { + showToast('请选择您的角色'); + } else if (state.orientation.isEmpty) { + showToast('请选择您的取向'); + }else if (state.interest.isEmpty) { + showToast('请选择您的兴趣'); + } else if (state.descEditingController.text.isEmpty) { + showToast('请输入您的交友宣言'); + } + } + + pushHome() { + Get.toNamed(AppRoutes.Home); + } } diff --git a/circle_app/lib/app/login/complete_material/state.dart b/circle_app/lib/app/login/complete_material/state.dart index e5611f8..520c46d 100644 --- a/circle_app/lib/app/login/complete_material/state.dart +++ b/circle_app/lib/app/login/complete_material/state.dart @@ -1,5 +1,17 @@ +import 'package:flutter/cupertino.dart'; + class Complete_materialState { + TextEditingController textEditingController = TextEditingController(); + TextEditingController descEditingController = TextEditingController(); + String nickName = ''; + String sex = ''; + String age = ''; + String role = ''; + String orientation = ''; + List interest = []; + Complete_materialState() { + ///Initialize variables } } diff --git a/circle_app/lib/app/login/complete_material/view.dart b/circle_app/lib/app/login/complete_material/view.dart index ac7285d..eee6559 100644 --- a/circle_app/lib/app/login/complete_material/view.dart +++ b/circle_app/lib/app/login/complete_material/view.dart @@ -1,4 +1,7 @@ +import 'package:circle_app/components/my_app_bar.dart'; +import 'package:circle_app/util/util.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'logic.dart'; @@ -6,15 +9,258 @@ import 'logic.dart'; class Complete_materialPage extends StatelessWidget { Complete_materialPage({Key? key}) : super(key: key); - final logic = Get.find(); - final state = Get.find().state; - @override Widget build(BuildContext context) { - return Stack( - children: [ - Image.asset('Values') - ], + return GetBuilder(builder: (Complete_materialLogic controller) { + return Stack( + children: [ + Container( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height, + child: Image.asset( + getBaseImage('bg'), + fit: BoxFit.fill, + ), + ), + Scaffold( + appBar: MyAppBar( + centerTitle: '完善您的个人形象', + isBack: true, + ), + backgroundColor: Colors.transparent, + body: GestureDetector( + onTap: () { + FocusManager.instance.primaryFocus?.unfocus(); + }, + child: SingleChildScrollView( + child: Container( + width: MediaQuery.of(context).size.width, + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 20.sp, + ), + GestureDetector( + onTap: () { + controller.getImageFile(); + }, + child: Image.asset( + getLoginImage('add'), + width: 86.sp, + height: 86.sp, + ), + ), + SizedBox( + height: 15.sp, + ), + Text( + '数据表明95%的人对完整的兽设更感兴趣', + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w500, + fontSize: 16.sp), + ), + funcWidget( + '昵称', + TextField( + controller: controller.state.textEditingController, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w500, + fontSize: 14.sp), + decoration: InputDecoration( + hintText: '请输入昵称', + hintStyle: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w500, + fontSize: 14.sp), + border: InputBorder.none, + contentPadding: EdgeInsets.only(left: 20.sp)), + ), + () {}, + img: 'edit'), + funcWidget( + '属性', + Text( + controller.state.sex, + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w500), + ), + () {}), + funcWidget( + '年龄', + Text( + controller.state.sex, + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w500), + ), + () {}), + funcWidget( + '角色', + Text( + controller.state.sex, + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w500), + ), + () {}), + funcWidget( + '取向', + Text( + controller.state.sex, + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + fontWeight: FontWeight.w500), + ), + () {}), + funcWidget( + '兴趣', + Row( + children: [interestWdiget('JK圈')], + ), + () {}), + Container( + margin: EdgeInsets.only( + top: 24.sp, + bottom: 18.sp, + left: 28.sp, + right: 28.sp), + height: 116.sp, + child: Stack( + children: [ + Image.asset(getLoginImage('desc_bg')), + TextField( + maxLines: 4, + controller: + controller.state.descEditingController, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w500, + fontSize: 14.sp), + decoration: InputDecoration( + hintText: '请输入您的交友宣言', + // icon: Text('交友宣言:',style: TextStyle(color: Colors.white,fontSize: 14.sp,fontWeight: FontWeight.w500),), + labelText: '您的交友宣言', + labelStyle: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w600, + fontSize: 16.sp), + hintStyle: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w500, + fontSize: 14.sp), + border: InputBorder.none, + contentPadding: EdgeInsets.all(20.sp)), + ) + ], + ), + ), + GestureDetector( + onTap:() { + controller.pushHome(); + // controller.checkInfo(); + }, + child: Container( + alignment: Alignment.center, + width: 133.sp, + height: 56.sp, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage(getLoginImage('start_bg'))), + ), + child: Text( + '开启小圈之旅', + style: TextStyle( + color: Color(0xff00FFF4), + fontSize: 16.sp, + fontWeight: FontWeight.w600), + ), + ), + ) + ], + ), + ), + ), + ), + ) + ], + ); + }); + } + + Widget funcWidget( + String leftStr, Widget tipWidget, GestureTapCallback callback, + {String img = 'down_arr'}) { + return Container( + width: Get.width, + padding: EdgeInsets.only(left: 28.sp, right: 28.sp), + height: 54.sp, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: GestureDetector( + onTap: callback, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text(leftStr, + style: TextStyle( + color: Colors.white, + fontSize: 16.sp, + fontWeight: FontWeight.w500, + shadows: [ + Shadow(color: Color(0xffF657FF), blurRadius: 4.0.sp) + ])), + Expanded(child: tipWidget), + Image.asset( + getLoginImage(img), + width: img == 'down_arr' ? 24.sp : 18.sp, + ) + ], + ), + ), + ), + lineWidget(), + ], + ), + ); + } + + lineWidget() { + return Container( + height: 1.sp, + width: Get.width - 28 * 2.sp, + decoration: const BoxDecoration( + gradient: + SweepGradient(colors: [Color(0xff03FEFB), Color(0xffE735F4)])), + ); + } + + interestWdiget(String interest) { + return Container( + height: 21.sp, + padding: EdgeInsets.only(left: 12.sp, right: 12.sp), + margin: EdgeInsets.only(left: 10.sp), + alignment: Alignment.center, + decoration: BoxDecoration( + border: Border.all(width: 1, color: Colors.white), + borderRadius: BorderRadius.circular(21.sp), + ), + child: Text( + interest, + style: TextStyle( + color: Colors.white, fontSize: 11.sp, fontWeight: FontWeight.w500), + ), ); } } diff --git a/circle_app/lib/components/my_app_bar.dart b/circle_app/lib/components/my_app_bar.dart new file mode 100644 index 0000000..ed40920 --- /dev/null +++ b/circle_app/lib/components/my_app_bar.dart @@ -0,0 +1,105 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +/// 自定义AppBar +class MyAppBar extends StatelessWidget implements PreferredSizeWidget { + + const MyAppBar({ + Key? key, + this.backgroundColor, + this.title = '', + this.centerTitle = '', + this.actionName = '', + this.backImg = 'assets/images/navigator/back.png', + this.backImgColor, + this.onPressed, + this.isDiyBack = false, + this.superContext, + this.isBack = true + }): super(key: key); + + final Color? backgroundColor; + final String title; + final String centerTitle; + final String backImg; + final Color? backImgColor; + final String actionName; + final VoidCallback? onPressed; + final bool isBack; + final bool isDiyBack; + final BuildContext? superContext; + + @override + Widget build(BuildContext context) { + final Color bgColor = backgroundColor ?? Colors.transparent; + + final SystemUiOverlayStyle overlayStyle = ThemeData.estimateBrightnessForColor(bgColor) == Brightness.dark + ? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark; + + final Widget action = Container(); + + final Widget back = isBack ? IconButton( + onPressed: () async { + if (isDiyBack) { + Navigator.pop(superContext!); + } else { + FocusManager.instance.primaryFocus?.unfocus(); + final isBack = await Navigator.maybePop(context); + if (!isBack) { + await SystemNavigator.pop(); + } + } + }, + padding: EdgeInsets.only(left: 15.sp), + icon: Image.asset( + backImg, + width: 24.sp, + height: 24.sp, + ), + ) : Container(); + + final Widget titleWidget = Semantics( + namesRoute: true, + header: true, + child: Container( + alignment: centerTitle.isEmpty ? Alignment.centerLeft : Alignment.center, + width: double.infinity, + margin: const EdgeInsets.symmetric(horizontal: 48.0), + child: ShaderMask( + shaderCallback: (Rect bounds) { + return const LinearGradient( + begin: Alignment(0.0,-1.0), + end: Alignment.bottomCenter, + colors: [Color(0xff71F3F2), Color(0xffF657FF)], + ).createShader(Offset.zero & bounds.size); + }, + child:Text( + title.isEmpty ? centerTitle : title, + style: TextStyle(fontSize: 18.sp,fontWeight: FontWeight.w600,color: Colors.white,shadows: [Shadow(color: Color(0xffF657FF), offset: Offset(0.0, -1))]), + ), + ), + )); + + return AnnotatedRegion( + value: overlayStyle, + child: Material( + color: bgColor, + child: SafeArea( + child: Stack( + alignment: Alignment.centerLeft, + children: [ + titleWidget, + back, + action, + ], + ), + ), + ), + ); + } + + @override + Size get preferredSize => const Size.fromHeight(48.0); +} diff --git a/circle_app/lib/main.dart b/circle_app/lib/main.dart index 828cb73..d926b75 100644 --- a/circle_app/lib/main.dart +++ b/circle_app/lib/main.dart @@ -25,6 +25,7 @@ class MyApp extends StatelessWidget { return GetMaterialApp( title: 'Flutter Demo', initialBinding: HomeBinding(), + getPages: AppPages.routes, home: HomePage(), ); }); diff --git a/circle_app/lib/router/app_pages.dart b/circle_app/lib/router/app_pages.dart index bfdebe4..f6b7a0f 100644 --- a/circle_app/lib/router/app_pages.dart +++ b/circle_app/lib/router/app_pages.dart @@ -1,5 +1,7 @@ import 'package:circle_app/app/home/binding.dart'; import 'package:circle_app/app/home/view.dart'; +import 'package:circle_app/app/login/complete_material/binding.dart'; +import 'package:circle_app/app/login/complete_material/view.dart'; import 'package:get/get_navigation/src/routes/get_route.dart'; import 'app_routers.dart'; @@ -12,5 +14,11 @@ class AppPages { page: () => HomePage(), binding: HomeBinding(), ), + GetPage( + name: AppRoutes.Complete_materialPage, + page: () => Complete_materialPage(), + binding: Complete_materialBinding(), + ), + ]; } diff --git a/circle_app/lib/router/app_routers.dart b/circle_app/lib/router/app_routers.dart index b52a4fd..bc34428 100644 --- a/circle_app/lib/router/app_routers.dart +++ b/circle_app/lib/router/app_routers.dart @@ -1,3 +1,4 @@ abstract class AppRoutes { static const Home = '/home'; + static const Complete_materialPage = '/Complete_materialPage'; } \ No newline at end of file diff --git a/circle_app/lib/util/util.dart b/circle_app/lib/util/util.dart index 91a3bdb..3e142ec 100644 --- a/circle_app/lib/util/util.dart +++ b/circle_app/lib/util/util.dart @@ -1,9 +1,14 @@ +import 'dart:ui'; + import 'package:circle_app/common/values/values.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; class Util { } - +//获取图片 String getBaseImage(String image) { return '${Values.base_images}${image}.png'; } @@ -22,4 +27,53 @@ String getMineImage(String image) { String getMsgImage(String image) { return '${Values.msg_images}${image}.png'; +} + +String getTabbarImage(String image) { + return '${Values.tabbar_images}${image}.png'; +} + +///弹窗文本提示 msg: 提示内容 +showToast(String msg) { + Fluttertoast.showToast( + msg: msg, + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.CENTER, + timeInSecForIosWeb: 1, + backgroundColor: Colors.black54, + textColor: Colors.white, + fontSize: 16.0 + ); +} + +///value: 文本内容;fontSize : 文字的大小;fontWeight:文字权重;maxWidth:文本框的最大宽度;maxLines:文本支持最大多少行 +double calculateTextHeight(String value, fontSize, FontWeight fontWeight, + double maxWidth, int maxLines) { + value = filterText(value); + TextPainter painter = TextPainter( + + ///AUTO:华为手机如果不指定locale的时候,该方法算出来的文字高度是比系统计算偏小的。 + locale: WidgetsBinding.instance!.window.locale, + maxLines: maxLines, + textDirection: TextDirection.ltr, + textScaleFactor: 1, //字体缩放大小 + text: TextSpan( + text: value, + style: TextStyle( + fontWeight: fontWeight, + fontSize: fontSize, + ))); + painter.layout(maxWidth: maxWidth); + + ///文字的宽度:painter.width + return painter.height; +} + +String filterText(String text) { + String tag = '
'; + while (text.contains('
')) { + // flutter 算高度,单个\n算不准,必须加两个 + text = text.replaceAll(tag, '\n\n'); + } + return text; } \ No newline at end of file diff --git a/circle_app/linux/flutter/generated_plugin_registrant.cc b/circle_app/linux/flutter/generated_plugin_registrant.cc index e71a16d..64a0ece 100644 --- a/circle_app/linux/flutter/generated_plugin_registrant.cc +++ b/circle_app/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,10 @@ #include "generated_plugin_registrant.h" +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); + file_selector_plugin_register_with_registrar(file_selector_linux_registrar); } diff --git a/circle_app/linux/flutter/generated_plugins.cmake b/circle_app/linux/flutter/generated_plugins.cmake index 2e1de87..2db3c22 100644 --- a/circle_app/linux/flutter/generated_plugins.cmake +++ b/circle_app/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/circle_app/macos/Flutter/Flutter-Debug.xcconfig b/circle_app/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b..4b81f9b 100644 --- a/circle_app/macos/Flutter/Flutter-Debug.xcconfig +++ b/circle_app/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/circle_app/macos/Flutter/Flutter-Release.xcconfig b/circle_app/macos/Flutter/Flutter-Release.xcconfig index c2efd0b..5caa9d1 100644 --- a/circle_app/macos/Flutter/Flutter-Release.xcconfig +++ b/circle_app/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/circle_app/macos/Flutter/GeneratedPluginRegistrant.swift b/circle_app/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..14b5f7c 100644 --- a/circle_app/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/circle_app/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,8 @@ import FlutterMacOS import Foundation +import file_selector_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) } diff --git a/circle_app/macos/Podfile b/circle_app/macos/Podfile new file mode 100644 index 0000000..049abe2 --- /dev/null +++ b/circle_app/macos/Podfile @@ -0,0 +1,40 @@ +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__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/circle_app/pubspec.lock b/circle_app/pubspec.lock index 6c98caf..cdfbe9d 100644 --- a/circle_app/pubspec.lock +++ b/circle_app/pubspec.lock @@ -41,6 +41,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.17.0" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + url: "https://pub.dev" + source: hosted + version: "0.3.3+4" cupertino_icons: dependency: "direct main" description: @@ -57,6 +65,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: d17c5e450192cdc40b718804dfb4eaf79a71bed60ee9530703900879ba50baa3 + url: "https://pub.dev" + source: hosted + version: "0.9.1+3" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "6290eec24fc4cc62535fe609e0c6714d3c1306191dc8c3b0319eaecc09423a3a" + url: "https://pub.dev" + source: hosted + version: "0.9.2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: "2a7f4bbf7bd2f022ecea85bfb1754e87f7dd403a9abc17a84a4fa2ddfe2abc0a" + url: "https://pub.dev" + source: hosted + version: "2.5.1" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: ef246380b66d1fb9089fc65622c387bf3780bca79f533424c31d07f12c2c7fd8 + url: "https://pub.dev" + source: hosted + version: "0.9.2" flutter: dependency: "direct main" description: flutter @@ -70,6 +110,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360" + url: "https://pub.dev" + source: hosted + version: "2.0.15" flutter_screenutil: dependency: "direct main" description: @@ -83,6 +131,19 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + sha256: "474f7d506230897a3cd28c965ec21c5328ae5605fc9c400cd330e9e9d6ac175c" + url: "https://pub.dev" + source: hosted + version: "8.2.2" get: dependency: "direct main" description: @@ -91,6 +152,86 @@ packages: url: "https://pub.dev" source: hosted version: "4.6.5" + http: + dependency: transitive + description: + name: http + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.dev" + source: hosted + version: "0.13.6" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: "direct main" + description: + name: image_picker + sha256: "6432178560d95303cc70d038363f892f5a05750dd27bc55220c7301af54d05e9" + url: "https://pub.dev" + source: hosted + version: "0.8.8" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "1ec6830289f5b6aeff3aa8239ea737c71950178dda389342dc2215adb06b4bd8" + url: "https://pub.dev" + source: hosted + version: "0.8.6+20" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "98f50d6b9f294c8ba35e25cc0d13b04bfddd25dbc8d32fa9d566a6572f2c081c" + url: "https://pub.dev" + source: hosted + version: "2.1.12" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: d779210bda268a03b57e923fb1e410f32f5c5e708ad256348bcbf1f44f558fd0 + url: "https://pub.dev" + source: hosted + version: "0.8.7+4" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "1d8f9a97178d6b8a035f1d2765f17f8ca3d36a40d5594e742a481b1e002f20be" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: ff094b36d6c06200808f733144a033e45b4e17d59524e1cf7d2af7e4cb94e1ab + url: "https://pub.dev" + source: hosted + version: "0.2.0" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "7c7b96bb9413a9c28229e717e6fd1e3edd1cc5569c1778fcca060ecf729b65ee" + url: "https://pub.dev" + source: hosted + version: "2.8.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: bf77b819eb62c487e6af53b9eb213adc12bd060ef7e43f3b1dd69c53cc24a61d + url: "https://pub.dev" + source: hosted + version: "0.2.0" js: dependency: transitive description: @@ -139,6 +280,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.2" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" + source: hosted + version: "2.1.4" sky_engine: dependency: transitive description: flutter @@ -192,6 +341,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.16" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" vector_math: dependency: transitive description: @@ -202,3 +359,4 @@ packages: version: "2.1.4" sdks: dart: ">=2.19.6 <3.0.0" + flutter: ">=3.3.0" diff --git a/circle_app/pubspec.yaml b/circle_app/pubspec.yaml index 61eafc2..434ab4c 100644 --- a/circle_app/pubspec.yaml +++ b/circle_app/pubspec.yaml @@ -37,6 +37,8 @@ dependencies: cupertino_icons: ^1.0.2 get: ^4.5.0 flutter_screenutil: ^5.6.0 + image_picker: ^0.8.6 + fluttertoast: ^8.1.0 dev_dependencies: flutter_test: diff --git a/circle_app/windows/flutter/generated_plugin_registrant.cc b/circle_app/windows/flutter/generated_plugin_registrant.cc index 8b6d468..77ab7a0 100644 --- a/circle_app/windows/flutter/generated_plugin_registrant.cc +++ b/circle_app/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + FileSelectorWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FileSelectorWindows")); } diff --git a/circle_app/windows/flutter/generated_plugins.cmake b/circle_app/windows/flutter/generated_plugins.cmake index b93c4c3..a423a02 100644 --- a/circle_app/windows/flutter/generated_plugins.cmake +++ b/circle_app/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST