王子贤 1 month ago
parent
commit
48bc6eb403
16 changed files with 253 additions and 207 deletions
  1. BIN
      .DS_Store
  2. BIN
      android/app/src/main/res/drawable-v21/background.png
  3. 5
      android/app/src/main/res/drawable-v21/launch_background.xml
  4. BIN
      android/app/src/main/res/drawable/background.png
  5. 5
      android/app/src/main/res/drawable/launch_background.xml
  6. 19
      android/app/src/main/res/values-night-v31/styles.xml
  7. 6
      android/app/src/main/res/values-night/styles.xml
  8. 19
      android/app/src/main/res/values-v31/styles.xml
  9. 6
      android/app/src/main/res/values/styles.xml
  10. BIN
      assets/.DS_Store
  11. BIN
      assets/images/splash.png
  12. BIN
      ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
  13. 132
      ios/Runner/Info.plist
  14. 2
      lib/pages/home/real_home_page.dart
  15. 264
      lib/pages/mine/phone_login_page.dart
  16. 2
      lib/pages/mine/real_login_page.dart

BIN
.DS_Store

BIN
android/app/src/main/res/drawable-v21/background.png

Before After
Width: 1500  |  Height: 3248  |  Size: 1.8 MiB

5
android/app/src/main/res/drawable-v21/launch_background.xml

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<item> <item>
<bitmap android:gravity="fill" android:src="@drawable/splash"/>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item> </item>
</layer-list>
</layer-list>

BIN
android/app/src/main/res/drawable/background.png

Before After
Width: 1500  |  Height: 3248  |  Size: 1.8 MiB

5
android/app/src/main/res/drawable/launch_background.xml

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<item> <item>
<bitmap android:gravity="fill" android:src="@drawable/splash"/>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item> </item>
</layer-list>
</layer-list>

19
android/app/src/main/res/values-night-v31/styles.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

6
android/app/src/main/res/values-night/styles.xml

@ -5,6 +5,10 @@
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your
@ -14,4 +18,4 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item> <item name="android:windowBackground">?android:colorBackground</item>
</style> </style>
</resources>
</resources>

19
android/app/src/main/res/values-v31/styles.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

6
android/app/src/main/res/values/styles.xml

@ -5,6 +5,10 @@
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your
@ -14,4 +18,4 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item> <item name="android:windowBackground">?android:colorBackground</item>
</style> </style>
</resources>
</resources>

BIN
assets/.DS_Store

BIN
assets/images/splash.png

Before After
Width: 1500  |  Height: 3248  |  Size: 1.8 MiB Width: 1500  |  Height: 3248  |  Size: 1.8 MiB

BIN
ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png

Before After
Width: 1500  |  Height: 3248  |  Size: 1.8 MiB Width: 1500  |  Height: 3248  |  Size: 1.8 MiB

132
ios/Runner/Info.plist

@ -1,74 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>星球奇遇记</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>PlanetAdventure</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>weixinULAPI</string>
<string>weixinURLParamsAPI</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict> <dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<key>NSAllowsArbitraryLoads</key>
<true/> <true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>快乐星球</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>dating_touchme_app</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>weixinULAPI</string>
<string>weixinURLParamsAPI</string>
</array>
<key>LSRequiresIPhoneOS</key>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/> <true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>需要访问相机以拍摄照片和视频</string>
<key>NSMicrophoneUsageDescription</key>
<string>需要访问麦克风以录制语音和视频</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>需要访问相册以选择和发送图片、视频</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>需要访问相册以保存图片和视频</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>需要获取您的位置信息以提供同城匹配服务</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</dict> </dict>
<key>NSCameraUsageDescription</key>
<string>用于拍摄照片/视频并上传到社区(如发布动态、上传头像或创建相册/图片集)。</string>
<key>NSMicrophoneUsageDescription</key>
<string>用于录制视频时采集声音,或发布语音内容(例如录一段语音分享到动态/评论)。</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>用于从相册选择照片/视频上传到社区(如发布动态、设置头像或上传到个人相册/图片集)。</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>用于将应用内图片/视频保存到系统相册(例如保存你发布或浏览到的图片)。</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>用于展示同城内容与附近活动(例如根据你所在城市推荐本地话题和线下活动)。</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</dict>
</plist> </plist>

2
lib/pages/home/real_home_page.dart

@ -35,7 +35,7 @@ class _RealHomePageState extends State<RealHomePage> with AutomaticKeepAliveClie
), ),
Scaffold( Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: PageAppbar(title: "快乐星球", color: Colors.white, backgroundColor: Colors.transparent,),
appBar: PageAppbar(title: "星球奇遇记", color: Colors.white, backgroundColor: Colors.transparent,),
body: Container( body: Container(
width: 375.w, width: 375.w,
padding: EdgeInsets.symmetric(horizontal: 15.w), padding: EdgeInsets.symmetric(horizontal: 15.w),

264
lib/pages/mine/phone_login_page.dart

@ -16,149 +16,151 @@ class PhoneLoginPage extends StatelessWidget {
builder: (controller){ builder: (controller){
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: !(controller.isSend.value) ? Container(
width: 375.w,
padding: EdgeInsets.only(
top: 310.w,
left: 25.w,
right: 25.w
),
child: Column(
children: [
Container(
height: 52.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
border: Border.all(width: 1.w, color: const Color.fromRGBO(230, 230, 230, 1))
),
child: Center(
child: TextField(
decoration: const InputDecoration(
hintText: '请输入你的手机号',
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 0,
body: SingleChildScrollView(
child: !(controller.isSend.value) ? Container(
width: 375.w,
padding: EdgeInsets.only(
top: 310.w,
left: 25.w,
right: 25.w
),
child: Column(
children: [
Container(
height: 52.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
border: Border.all(width: 1.w, color: const Color.fromRGBO(230, 230, 230, 1))
),
child: Center(
child: TextField(
decoration: const InputDecoration(
hintText: '请输入你的手机号',
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 0,
),
counterText: '',
), ),
counterText: '',
keyboardType: TextInputType.phone,
inputFormatters: [
// 0-9
FilteringTextInputFormatter.digitsOnly,
],
maxLength: 11,
onChanged: (value) {
controller.phoneNumber.value = value;
},
style: const TextStyle(fontSize: 16),
), ),
keyboardType: TextInputType.phone,
inputFormatters: [
// 0-9
FilteringTextInputFormatter.digitsOnly,
],
maxLength: 11,
onChanged: (value) {
controller.phoneNumber.value = value;
},
style: const TextStyle(fontSize: 16),
), ),
), ),
),
SizedBox(height: 10.w,),
Text(
"未注册的手机号将在登录后自动注册",
style: TextStyle(
fontSize: 11.w,
color: const Color.fromRGBO(189, 189, 189, 1)
),
),
SizedBox(height: 30.w,),
Container(
width: 325.w,
height: 52.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(52.w)),
gradient: controller.phoneNumber.value.isNotEmpty ? LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color.fromRGBO(131, 89, 255, 1),
Color.fromRGBO(61, 138, 224, 1),
],
) : null,
color: const Color.fromRGBO(217, 217, 217, 1)
SizedBox(height: 10.w,),
Text(
"未注册的手机号将在登录后自动注册",
style: TextStyle(
fontSize: 11.w,
color: const Color.fromRGBO(189, 189, 189, 1)
),
), ),
child: Center(
child: Text(
"获取验证码",
style: TextStyle(
fontSize: 18.w,
color: Colors.white
SizedBox(height: 30.w,),
Container(
width: 325.w,
height: 52.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(52.w)),
gradient: controller.phoneNumber.value.isNotEmpty ? LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color.fromRGBO(131, 89, 255, 1),
Color.fromRGBO(61, 138, 224, 1),
],
) : null,
color: const Color.fromRGBO(217, 217, 217, 1)
),
child: Center(
child: Text(
"获取验证码",
style: TextStyle(
fontSize: 18.w,
color: Colors.white
),
), ),
), ),
).onTap(() {
controller.isSendingCode.value ||
controller.countdownSeconds.value > 0
? null
: controller.getVerificationCode();
}),
],
),
) : Container(
width: 375.w,
padding: EdgeInsets.only(
top: 271.w,
left: 25.w,
right: 25.w
),
child: Column(
children: [
Text(
"已发送到${controller.phoneNumber.value}",
style: TextStyle(
fontSize: 14.w
),
), ),
).onTap(() {
controller.isSendingCode.value ||
controller.countdownSeconds.value > 0
? null
: controller.getVerificationCode();
}),
],
),
) : Container(
width: 375.w,
padding: EdgeInsets.only(
top: 271.w,
left: 25.w,
right: 25.w
),
child: Column(
children: [
Text(
"已发送到${controller.phoneNumber.value}",
style: TextStyle(
fontSize: 14.w
),
),
SizedBox(height: 20.w,),
SizedBox(height: 20.w,),
Pinput(
length: 6,
controller: controller.passwordController.value,
inputFormatters: [
// 0-9
FilteringTextInputFormatter.digitsOnly,
],
onCompleted: (pin) {
controller.verificationCode.value = pin;
controller.isLoggingIn.value
? null
: controller.login();
},
),
SizedBox(height: 40.w,),
Container(
width: 325.w,
height: 52.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(52.w)),
gradient: controller.countdownSeconds.value <= 0 ? LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color.fromRGBO(131, 89, 255, 1),
Color.fromRGBO(61, 138, 224, 1),
],
) : null,
color: const Color.fromRGBO(217, 217, 217, 1)
Pinput(
length: 6,
controller: controller.passwordController.value,
inputFormatters: [
// 0-9
FilteringTextInputFormatter.digitsOnly,
],
onCompleted: (pin) {
controller.verificationCode.value = pin;
controller.isLoggingIn.value
? null
: controller.login();
},
), ),
child: Center(
child: Text(
controller.countdownSeconds.value > 0 ? "获取验证码 ${controller.countdownSeconds.value}s" : "获取验证码",
style: TextStyle(
fontSize: 18.w,
color: Colors.white
SizedBox(height: 40.w,),
Container(
width: 325.w,
height: 52.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(52.w)),
gradient: controller.countdownSeconds.value <= 0 ? LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color.fromRGBO(131, 89, 255, 1),
Color.fromRGBO(61, 138, 224, 1),
],
) : null,
color: const Color.fromRGBO(217, 217, 217, 1)
),
child: Center(
child: Text(
controller.countdownSeconds.value > 0 ? "获取验证码 ${controller.countdownSeconds.value}s" : "获取验证码",
style: TextStyle(
fontSize: 18.w,
color: Colors.white
),
), ),
), ),
),
).onTap(() {
controller.isSendingCode.value ||
controller.countdownSeconds.value > 0
? null
: controller.getVerificationCode();
}),
],
).onTap(() {
controller.isSendingCode.value ||
controller.countdownSeconds.value > 0
? null
: controller.getVerificationCode();
}),
],
),
), ),
), ),
); );

2
lib/pages/mine/real_login_page.dart

@ -52,7 +52,7 @@ class _RealLoginPageState extends State<RealLoginPage> {
), ),
SizedBox(height: 12.w,), SizedBox(height: 12.w,),
Text( Text(
"快乐星球",
"星球奇遇记",
style: TextStyle( style: TextStyle(
fontSize: 24.w fontSize: 24.w
), ),

Loading…
Cancel
Save