boyrobot 9 months ago
parent
commit
31ba0a95e1

File diff suppressed because it is too large
+ 0 - 0
.flutter-plugins-dependencies


+ 1 - 1
lib/main.dart

@@ -26,7 +26,7 @@ void main() {
     ..provide(Provider.function((_) => GoodsDetailProvide())) // 商品详情页面
     ..provide(Provider.function((_) => CartProvide())); // 购物车持久化
 
-  final Router router = Router();
+  final FluroRouter router = FluroRouter();
   Routers.configureRouters(router);
   Application.router = router;
 

+ 1 - 1
lib/routers/application.dart

@@ -2,6 +2,6 @@ import 'package:fluro/fluro.dart';
 //import 'package:jpush_flutter/jpush_flutter.dart';
 
 class Application {
-  static Router router;
+  static FluroRouter router;
 //  static JPush jPush;
 }

+ 1 - 1
lib/routers/routers.dart

@@ -7,7 +7,7 @@ class Routers {
   static String map = '/map';
   static String settings = '/settings';
 
-  static void configureRouters(Router router) {
+  static void configureRouters(FluroRouter router) {
     router.notFoundHandler = Handler(handlerFunc: (_, params) {
       print('not found');
     });

+ 1 - 1
lib/service/service_method.dart

@@ -15,7 +15,7 @@ Future<Response> request(String url, {Map formData}) async {
   try {
     Response response;
     Dio dio = Dio();
-    dio.options.contentType = ContentType.parse('application/x-www-form-urlencoded');
+    dio.options.contentType = ContentType.parse('application/x-www-form-urlencoded').value;
     if (formData == null) {
       response = await dio.post(url);
     } else {

+ 3 - 3
lib/views/category_page.dart

@@ -229,11 +229,11 @@ class _CategoryPageState extends State<CategoryPage> {
                         // 当前商品列表下有数据情况
                         : EasyRefresh(
                             key: _refreshKey,
-                            refreshHeader: BallPulseHeader(
+                            header: BallPulseHeader(
                                 key: _headerKey, color: Colors.pink),
-                            refreshFooter: BallPulseFooter(
+                            footer: BallPulseFooter(
                                 key: _footerKey, color: Colors.pink),
-                            loadMore: () {
+                            onRefresh: () {
                               _requestGoodsList();
                             },
                             child: GridView.builder(

+ 1 - 1
lib/views/deatilspage/details_page.dart

@@ -38,7 +38,7 @@ class DetailsPage extends StatelessWidget {
                             handle:
                                 NestedScrollView.sliverOverlapAbsorberHandleFor(
                                     context),
-                            child: SliverHeaderBar(
+                            sliver: SliverHeaderBar(
                                 detailProvide: detailProvide,
                                 tabs: _tabs,
                                 innerScrolled: innerScrolled),

+ 1 - 1
lib/views/deatilspage/goods_handler.dart

@@ -86,7 +86,7 @@ class GoodsHandler extends StatelessWidget {
                     // 加入购物车按钮
                     Padding(
                       padding: const EdgeInsets.only(left: 30.0),
-                      child: OutlineButton(
+                      child: TextButton(
                           child: Text('确定加入购物车'),
                           onPressed: () {
                             Provide.value<CartProvide>(context).saveCarts(

+ 3 - 3
lib/views/homepage/home_page.dart

@@ -92,11 +92,11 @@ class HomePage extends StatelessWidget {
                     ? Center(child: CupertinoActivityIndicator(radius: 12.0))
                     : EasyRefresh(
                         key: _refreshKey,
-                        refreshHeader: BallPulseHeader(
+                        header: BallPulseHeader(
                             key: _headerKey, color: Colors.pink),
-                        refreshFooter: BallPulseFooter(
+                        footer: BallPulseFooter(
                             key: _footerKey, color: Colors.pink),
-                        loadMore: () => homeProvide.loadMoreHotGoods(),
+                        onRefresh : () => homeProvide.loadMoreHotGoods(),
                         child: CustomScrollView(
                           controller: _outController,
                           physics: BouncingScrollPhysics(),

+ 4 - 4
lib/views/index_page.dart

@@ -12,13 +12,13 @@ class IndexPage extends StatelessWidget {
   Widget build(BuildContext context) {
     final _bottomTabs = <BottomNavigationBarItem>[
       BottomNavigationBarItem(
-          icon: Icon(CupertinoIcons.home), title: Text('首页')),
+          icon: Icon(CupertinoIcons.home), label: '首页'),
       BottomNavigationBarItem(
-          icon: Icon(CupertinoIcons.search), title: Text('分类')),
+          icon: Icon(CupertinoIcons.search), label: '分类'),
       BottomNavigationBarItem(
-          icon: Icon(CupertinoIcons.shopping_cart), title: Text('购物车')),
+          icon: Icon(CupertinoIcons.shopping_cart), label: '购物车'),
       BottomNavigationBarItem(
-          icon: Icon(CupertinoIcons.profile_circled), title: Text('会员中心'))
+          icon: Icon(CupertinoIcons.profile_circled), label: '会员中心')
     ];
 
     final _tabPages = <Widget>[

+ 1 - 1
lib/views/my_home_page.dart

@@ -32,7 +32,7 @@ class _MyHomePageState extends State<MyHomePage> {
             ),
             Text(
               '$_counter',
-              style: Theme.of(context).textTheme.display1,
+              style: Theme.of(context).textTheme.headlineMedium,
             ),
           ],
         ),

+ 3 - 3
pubspec.yaml

@@ -1,8 +1,8 @@
 name: flutter_note
 description: Flutter 工作中不断总结.
-version: 1.2.1+1
+version: 1.2.8+1
 environment:
-  sdk: ">=2.19.2 <3.0.0"
+  sdk: ">=2.7.0 <3.0.0"
 
 dependencies:
   flutter:
@@ -11,7 +11,7 @@ dependencies:
   shared_preferences: ^2.0.7
   fluro: ^2.0.3
   cupertino_icons: ^1.0.3
-  dio: ^4.0.0
+  dio: ^5.3.0
   flutter_easyrefresh: ^2.2.2
   flutter_swiper: ^1.1.6
   flutter_html: ^2.2.1

Some files were not shown because too many files changed in this diff