Browse Source

fix error

boyrobot 9 months ago
parent
commit
45497d326e

+ 2 - 2
android/app/build.gradle

@@ -25,14 +25,14 @@ apply plugin: 'com.android.application'
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion 31
+    compileSdkVersion 33
 
 
     defaultConfig {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "com.example.demo"
         minSdkVersion 16
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode flutterVersionCode.toInteger()
         versionName flutterVersionName
     }

+ 1 - 0
android/app/src/main/AndroidManifest.xml

@@ -14,6 +14,7 @@
         <activity
             android:name=".MainActivity"
             android:launchMode="singleTop"
+            android:exported="true"
             android:theme="@style/LaunchTheme"
             android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
             android:hardwareAccelerated="true"

+ 1 - 1
lib/bizmodule/bizwidget/cover_image_item.dart

@@ -6,7 +6,7 @@ class CoverImageItem extends StatelessWidget {
   final int duration;
 
   const CoverImageItem(
-      {Key key, this.width: 0, this.coverUrl, this.duration: -1})
+      {Key key, this.width = 0, this.coverUrl, this.duration = -1})
       : super(key: key);
 
   @override

+ 9 - 6
lib/bizmodule/bizwidget/follow_list_head.dart

@@ -36,8 +36,7 @@ class FollowListHead extends StatelessWidget {
     var btnFollow = Container(
       width: 40,
       height: 20,
-      child: OutlineButton(
-        padding: EdgeInsets.all(0),
+      child: TextButton(
         child: Text(
           '+关注',
           style: TextStyle(
@@ -46,11 +45,15 @@ class FollowListHead extends StatelessWidget {
             color: Color(0xff666666),
           ),
         ),
-        borderSide: BorderSide(
-          color: Color(0xff333333),
-          width: 0.5,
-          style: BorderStyle.solid,
+        // borderSide: BorderSide(
+        //   color: Color(0xff333333),
+        //   width: 0.5,
+        //   style: BorderStyle.solid,
+        // ),
+        style: ButtonStyle(
+          padding: MaterialStateProperty.all(EdgeInsets.all(0)),
         ),
+
         onPressed: () => null,
       ),
     );

+ 8 - 7
lib/bizmodule/bizwidget/header_item.dart

@@ -30,8 +30,7 @@ class HeaderItem extends StatelessWidget {
               Container(
                 width: 60,
                 height: 20,
-                child: OutlineButton(
-                  padding: EdgeInsets.all(0),
+                child: TextButton(
                   child: Text(
                     '查看更多',
                     style: TextStyle(
@@ -40,11 +39,13 @@ class HeaderItem extends StatelessWidget {
                       color: Color(0xff666666),
                     ),
                   ),
-                  borderSide: BorderSide(
-                    color: Color(0xff333333),
-                    width: 0.5,
-                    style: BorderStyle.solid,
-                  ),
+                  style: ButtonStyle(
+                      padding: MaterialStateProperty.all(EdgeInsets.all(0))),
+                  // borderSide: BorderSide(
+                  //   color: Color(0xff333333),
+                  //   width: 0.5,
+                  //   style: BorderStyle.solid,
+                  // ),
                   onPressed: () => null,
                 ),
               )

+ 1 - 1
lib/bizmodule/main/community/blocs/community_event.dart

@@ -15,5 +15,5 @@ class EventRequest extends CommunityEvent {
 
   final bool isRefresh;
 
-  const EventRequest({this.isFirst: true, this.isRefresh: true});
+  const EventRequest({this.isFirst = true, this.isRefresh = true});
 }

+ 0 - 5
lib/bizmodule/main/selections/model/selection_model.g.dart

@@ -306,11 +306,6 @@ Shield _$ShieldFromJson(Map<String, dynamic> json) {
   );
 }
 
-Map<String, dynamic> _$ShieldToJson(Shield instance) => <String, dynamic>{
-      'itemType': instance.itemType,
-      'itemId': instance.itemId,
-      'shielded': instance.shielded,
-    };
 
 Cover _$CoverFromJson(Map<String, dynamic> json) {
   return Cover(

+ 5 - 5
lib/framework/extension/context_extension.dart

@@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
 
 extension ContextExtension on BuildContext {
   void showSnackBar(
-      {@required String msg, Duration duration: const Duration(seconds: 3)}) {
-    Scaffold.of(this).showSnackBar(
-      SnackBar(
+      {@required String msg, Duration duration = const Duration(seconds: 3)}) {
+    Scaffold.of(this).showBottomSheet((context) {
+      return SnackBar(
         shape: RoundedRectangleBorder(
             borderRadius: BorderRadius.only(
           topLeft: Radius.circular(5),
@@ -12,7 +12,7 @@ extension ContextExtension on BuildContext {
         )),
         content: Text(msg),
         duration: duration,
-      ),
-    );
+      );
+    });
   }
 }

+ 15 - 15
lib/framework/uikit/carousel/carousel_option.dart

@@ -74,24 +74,24 @@ class CarouselOption {
 
   CarouselOption(
       {this.height,
-      this.aspectRatio: 16 / 9,
-      this.viewportFraction: 0.8,
-      this.initIndex: 0,
-      this.isEnableLoop: true,
-      this.isEnableReverse: false,
-      this.autoPlay: true,
-      this.autoPlayInterval: const Duration(seconds: 4),
-      this.autoPlayAnimationDuration: const Duration(milliseconds: 800),
-      this.autoPlayCurve: Curves.fastOutSlowIn,
+      this.aspectRatio = 16 / 9,
+      this.viewportFraction = 0.8,
+      this.initIndex = 0,
+      this.isEnableLoop = true,
+      this.isEnableReverse = false,
+      this.autoPlay = true,
+      this.autoPlayInterval = const Duration(seconds: 4),
+      this.autoPlayAnimationDuration = const Duration(milliseconds: 800),
+      this.autoPlayCurve = Curves.fastOutSlowIn,
       this.isEnableLargeCenterPage = false,
       this.onPageChanged,
       this.onScrolled,
       this.scrollPhysics,
-      this.scrollDirection: Axis.horizontal,
-      this.pauseAutoPlayOnTouch: true,
-      this.pauseAutoPlayOnManualNavigate: true,
-      this.pauseAutoPlayInFiniteScroll: false,
+      this.scrollDirection = Axis.horizontal,
+      this.pauseAutoPlayOnTouch = true,
+      this.pauseAutoPlayOnManualNavigate = true,
+      this.pauseAutoPlayInFiniteScroll = false,
       this.pageViewKey,
-      this.enlargeStrategy: CenterPageEnlargeStrategy.scale,
-      this.disableCenter: false});
+      this.enlargeStrategy = CenterPageEnlargeStrategy.scale,
+      this.disableCenter = false});
 }

+ 13 - 4
lib/framework/uikit/scrollview/overscroll_behavior.dart

@@ -7,8 +7,8 @@ class OverScrollBehavior extends ScrollBehavior {
   OverScrollBehavior({this.isShowLeading = true, this.isShowTrailing = true});
 
   @override
-  Widget buildViewportChrome(
-      BuildContext context, Widget child, AxisDirection axisDirection) {
+  Widget buildOverscrollIndicator(
+      BuildContext context, Widget child, ScrollableDetails details) {
     switch (getPlatform(context)) {
       case TargetPlatform.iOS:
         return child;
@@ -20,9 +20,18 @@ class OverScrollBehavior extends ScrollBehavior {
           showLeading: false,
           //不显示尾部水波纹
           showTrailing: false,
-          axisDirection: axisDirection,
-          color: Theme.of(context).accentColor,
+          axisDirection: details.direction,
+          color: Theme.of(context).colorScheme.secondary,
         );
+      case TargetPlatform.linux:
+        // TODO: Handle this case.
+        break;
+      case TargetPlatform.macOS:
+        // TODO: Handle this case.
+        break;
+      case TargetPlatform.windows:
+        // TODO: Handle this case.
+        break;
     }
     return child;
   }

+ 8 - 0
linux/flutter/generated_plugins.cmake

@@ -5,6 +5,9 @@
 list(APPEND FLUTTER_PLUGIN_LIST
 )
 
+list(APPEND FLUTTER_FFI_PLUGIN_LIST
+)
+
 set(PLUGIN_BUNDLED_LIBRARIES)
 
 foreach(plugin ${FLUTTER_PLUGIN_LIST})
@@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
 endforeach(plugin)
+
+foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
+  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
+  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
+endforeach(ffi_plugin)

+ 1 - 1
pubspec.yaml

@@ -4,7 +4,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 version: 1.2.1+1
 
 environment:
-  sdk: '>=2.19.2 <3.0.0'
+  sdk: '>=2.7.0 <3.0.0'
 
 dependencies:
   flutter:

+ 8 - 0
windows/flutter/generated_plugins.cmake

@@ -5,6 +5,9 @@
 list(APPEND FLUTTER_PLUGIN_LIST
 )
 
+list(APPEND FLUTTER_FFI_PLUGIN_LIST
+)
+
 set(PLUGIN_BUNDLED_LIBRARIES)
 
 foreach(plugin ${FLUTTER_PLUGIN_LIST})
@@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
 endforeach(plugin)
+
+foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
+  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
+  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
+endforeach(ffi_plugin)