liuyuqi-dellpc 3 years ago
parent
commit
1bc842c92b

+ 0 - 1
.flutter-plugins-dependencies

@@ -1 +0,0 @@
-{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"camera","dependencies":[]},{"name":"firebase_ml_vision","dependencies":[]},{"name":"image_gallery_saver","dependencies":[]},{"name":"image_picker","dependencies":[]},{"name":"image_picker_saver","dependencies":[]},{"name":"path_provider","dependencies":[]},{"name":"shared_preferences","dependencies":[]},{"name":"video_player","dependencies":[]}]}

+ 7 - 7
android/app/build.gradle

@@ -22,11 +22,11 @@ if (flutterVersionName == null) {
 }
 }
 
 
 apply plugin: 'com.android.application'
 apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
+// apply plugin: 'kotlin-android'
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 
 android {
 android {
-    compileSdkVersion 28
+    compileSdkVersion 30
 
 
     sourceSets {
     sourceSets {
         main.java.srcDirs += 'src/main/kotlin'
         main.java.srcDirs += 'src/main/kotlin'
@@ -40,7 +40,7 @@ android {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "com.example.douyin_demo"
         applicationId "com.example.douyin_demo"
         minSdkVersion 21
         minSdkVersion 21
-        targetSdkVersion 28
+        targetSdkVersion 30
         versionCode flutterVersionCode.toInteger()
         versionCode flutterVersionCode.toInteger()
         versionName flutterVersionName
         versionName flutterVersionName
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -60,10 +60,10 @@ flutter {
 }
 }
 
 
 dependencies {
 dependencies {
-    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-    testImplementation 'junit:junit:4.12'
-    androidTestImplementation 'androidx.test:runner:1.1.0'
-    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
+    // implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+    // testImplementation 'junit:junit:4.12'
+    // androidTestImplementation 'androidx.test:runner:1.1.0'
+    // androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
     implementation 'com.google.firebase:firebase-analytics:17.2.0'
     implementation 'com.google.firebase:firebase-analytics:17.2.0'
     api 'com.google.firebase:firebase-ml-vision-image-label-model:17.0.2'
     api 'com.google.firebase:firebase-ml-vision-image-label-model:17.0.2'
     api 'com.google.firebase:firebase-ml-vision-face-model:17.0.2'
     api 'com.google.firebase:firebase-ml-vision-face-model:17.0.2'

+ 3 - 3
android/build.gradle

@@ -1,13 +1,13 @@
 buildscript {
 buildscript {
-    ext.kotlin_version = '1.2.71'
+    // ext.kotlin_version = '1.2.71'
     repositories {
     repositories {
         google()
         google()
         jcenter()
         jcenter()
     }
     }
 
 
     dependencies {
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.2.1'
-        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+        classpath 'com.android.tools.build:gradle:4.1.0'
+        // classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
         classpath 'com.google.gms:google-services:4.2.0'
         classpath 'com.google.gms:google-services:4.2.0'
     }
     }
 }
 }

+ 1 - 1
android/gradle/wrapper/gradle-wrapper.properties

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

+ 24 - 289
lib/main.dart

@@ -3,24 +3,17 @@ import 'dart:io';
 import 'package:douyin_demo/pages/RecommendPage/BottomSheet.dart';
 import 'package:douyin_demo/pages/RecommendPage/BottomSheet.dart';
 import 'package:douyin_demo/providers/RecommendProvider.dart';
 import 'package:douyin_demo/providers/RecommendProvider.dart';
 import 'package:douyin_demo/widgets/BottomBar.dart';
 import 'package:douyin_demo/widgets/BottomBar.dart';
-// import 'package:douyin_demo/widgets/FavAnimation.dart' as prefix0;
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_swiper/flutter_swiper.dart';
 import 'package:flutter_swiper/flutter_swiper.dart';
-// import 'package:marquee/marquee.dart';
 import 'package:marquee_flutter/marquee_flutter.dart';
 import 'package:marquee_flutter/marquee_flutter.dart';
 import 'package:provider/provider.dart';
 import 'package:provider/provider.dart';
 import 'package:shared_preferences/shared_preferences.dart';
 import 'package:shared_preferences/shared_preferences.dart';
 import 'package:video_player/video_player.dart';
 import 'package:video_player/video_player.dart';
-
 import 'widgets/FavAnimation.dart';
 import 'widgets/FavAnimation.dart';
 
 
 Future main() async {
 Future main() async {
   WidgetsFlutterBinding.ensureInitialized();
   WidgetsFlutterBinding.ensureInitialized();
   final prefs = await SharedPreferences.getInstance();
   final prefs = await SharedPreferences.getInstance();
-  // prefs.clear();
-  // String hosts = prefs.get('urlPath');
-  // String scheme = prefs.get('scheme');
-  // int ports = prefs.get('ports');
   prefs.setBool("ifIOS", Platform.isIOS);
   prefs.setBool("ifIOS", Platform.isIOS);
   prefs.setBool("ifPrd", false);
   prefs.setBool("ifPrd", false);
   prefs.setBool("ifReal_d", false);
   prefs.setBool("ifReal_d", false);
@@ -44,7 +37,6 @@ Future main() async {
   prefs.setString("picServer", "http://www.guojio.com");
   prefs.setString("picServer", "http://www.guojio.com");
 
 
   runApp(MyApp());
   runApp(MyApp());
-  // runApp(MyApp());
 }
 }
 
 
 class MyApp extends StatelessWidget {
 class MyApp extends StatelessWidget {
@@ -65,11 +57,10 @@ class MyApp extends StatelessWidget {
 class RecommendPage extends StatelessWidget {
 class RecommendPage extends StatelessWidget {
   const RecommendPage({Key key, @required this.selIndex}) : super(key: key);
   const RecommendPage({Key key, @required this.selIndex}) : super(key: key);
   final int selIndex;
   final int selIndex;
+
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     double rpx = MediaQuery.of(context).size.width / 750;
     double rpx = MediaQuery.of(context).size.width / 750;
-    // MediaQuery.of(context).padding.top
-    // MediaQuery.of(context).padding.bottom
 
 
     return MultiProvider(
     return MultiProvider(
         providers: [
         providers: [
@@ -104,34 +95,39 @@ class MainTabView extends StatelessWidget {
 
 
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
+
     RecommendProvider provider = Provider.of<RecommendProvider>(context);
     RecommendProvider provider = Provider.of<RecommendProvider>(context);
     return TabBarView(
     return TabBarView(
-      
       controller: provider.controller,
       controller: provider.controller,
       children: <Widget>[
       children: <Widget>[
-        SwiperMain(type: "followed",),
-        SwiperMain(type: "recommend",),
+        SwiperMain(
+          type: "followed",
+        ),
+        SwiperMain(
+          type: "recommend",
+        ),
       ],
       ],
     );
     );
   }
   }
 }
 }
 
 
 class SwiperMain extends StatefulWidget {
 class SwiperMain extends StatefulWidget {
-  SwiperMain({Key key,this.type}) : super(key: key);
+  SwiperMain({Key key, this.type}) : super(key: key);
   final String type;
   final String type;
+
   _SwiperMainState createState() => _SwiperMainState();
   _SwiperMainState createState() => _SwiperMainState();
 }
 }
 
 
-class _SwiperMainState extends State<SwiperMain> with AutomaticKeepAliveClientMixin {
+class _SwiperMainState extends State<SwiperMain>
+    with AutomaticKeepAliveClientMixin {
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     RecommendProvider provider = Provider.of<RecommendProvider>(context);
     RecommendProvider provider = Provider.of<RecommendProvider>(context);
-    List<MainInfo> infos=List<MainInfo>();
-    if(widget.type=="followed"){
-      infos=provider.followed;
-    }
-    else{
-      infos=provider.infos;
+    List<MainInfo> infos = List<MainInfo>();
+    if (widget.type == "followed") {
+      infos = provider.followed;
+    } else {
+      infos = provider.infos;
     }
     }
     return Swiper(
     return Swiper(
       loop: false,
       loop: false,
@@ -157,42 +153,10 @@ class _SwiperMainState extends State<SwiperMain> with AutomaticKeepAliveClientMi
   bool get wantKeepAlive => true;
   bool get wantKeepAlive => true;
 }
 }
 
 
-// class SwiperMain extends StatelessWidget {
-//   const SwiperMain({Key key,@required this.type}) : super(key: key);
-//   final String type;
-//   @override
-//   Widget build(BuildContext context) {
-//     RecommendProvider provider = Provider.of<RecommendProvider>(context);
-//     List<MainInfo> infos=List<MainInfo>();
-//     if(type=="followed"){
-//       infos=provider.followed;
-//     }
-//     else{
-//       infos=provider.infos;
-//     }
-//     return Swiper(
-//       loop: false,
-//       scrollDirection: Axis.vertical,
-//       itemCount: infos.length,
-//       itemBuilder: (context, index) {
-//         MainInfo curData = infos[index];
-//         return Container(
-//           decoration: BoxDecoration(color: Colors.black),
-//           child: Stack(children: [
-//             CenterImage(
-//               videoPath: curData.videoPath,
-//             ),
-//             Home(),
-//           ]),
-//         );
-//       },
-//     );
-//   }
-// }
-
 class BottomSafeBar extends StatelessWidget {
 class BottomSafeBar extends StatelessWidget {
   const BottomSafeBar({Key key, @required this.selIndex}) : super(key: key);
   const BottomSafeBar({Key key, @required this.selIndex}) : super(key: key);
   final int selIndex;
   final int selIndex;
+
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     RecommendProvider provider = Provider.of<RecommendProvider>(context);
     RecommendProvider provider = Provider.of<RecommendProvider>(context);
@@ -218,6 +182,7 @@ class BottomSafeBar extends StatelessWidget {
 class CenterImage extends StatelessWidget {
 class CenterImage extends StatelessWidget {
   const CenterImage({Key key, @required this.videoPath}) : super(key: key);
   const CenterImage({Key key, @required this.videoPath}) : super(key: key);
   final String videoPath;
   final String videoPath;
+
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     // double bottom = MediaQuery.of(context).viewInsets.bottom;
     // double bottom = MediaQuery.of(context).viewInsets.bottom;
@@ -267,11 +232,11 @@ class _VideoBackState extends State<VideoBack> {
     return Container(
     return Container(
       child: _controller.value.initialized
       child: _controller.value.initialized
           // 加载成功
           // 加载成功
-          ? new AspectRatio(
+          ? AspectRatio(
               aspectRatio: _controller.value.aspectRatio,
               aspectRatio: _controller.value.aspectRatio,
               child: VideoPlayer(_controller),
               child: VideoPlayer(_controller),
             )
             )
-          : new Container(),
+          : Container(),
     );
     );
   }
   }
 }
 }
@@ -334,12 +299,11 @@ class _TopTabState extends State<TopTab> with SingleTickerProviderStateMixin {
     // TODO: implement initState
     // TODO: implement initState
     super.initState();
     super.initState();
     // _controller = TabController(vsync: this, length: 2, initialIndex: 1);
     // _controller = TabController(vsync: this, length: 2, initialIndex: 1);
-    
   }
   }
 
 
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
-    RecommendProvider provider=Provider.of<RecommendProvider>(context);
+    RecommendProvider provider = Provider.of<RecommendProvider>(context);
     double rpx = MediaQuery.of(context).size.width / 750;
     double rpx = MediaQuery.of(context).size.width / 750;
     return Row(
     return Row(
       crossAxisAlignment: CrossAxisAlignment.center,
       crossAxisAlignment: CrossAxisAlignment.center,
@@ -451,6 +415,7 @@ class _RotateAlbumState extends State<RotateAlbum>
     with SingleTickerProviderStateMixin {
     with SingleTickerProviderStateMixin {
   AnimationController _controller;
   AnimationController _controller;
   var animation;
   var animation;
+
   @override
   @override
   void initState() {
   void initState() {
     super.initState();
     super.initState();
@@ -625,22 +590,11 @@ class _ButtonListState extends State<ButtonList> {
   }
   }
 }
 }
 
 
-// class ButtonList extends StatelessWidget {
-//   const ButtonList({Key key}) : super(key: key);
-
-//   @override
-
-// }
-
-// getButtonList(double rpx, RecommendProvider provider, BuildContext context) {
-
-//   return
-// }
-
 class IconText extends StatelessWidget {
 class IconText extends StatelessWidget {
   const IconText({Key key, this.icon, this.text}) : super(key: key);
   const IconText({Key key, this.icon, this.text}) : super(key: key);
   final AnimatedIconWidget icon;
   final AnimatedIconWidget icon;
   final String text;
   final String text;
+
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     double rpx = MediaQuery.of(context).size.width / 750;
     double rpx = MediaQuery.of(context).size.width / 750;
@@ -664,7 +618,6 @@ class IconText extends StatelessWidget {
 }
 }
 
 
 showBottom(context, provider) {
 showBottom(context, provider) {
-  // RecommendProvider provider = Provider.of<RecommendProvider>(context);
   double height = MediaQuery.of(context).size.height;
   double height = MediaQuery.of(context).size.height;
   provider.setScreenHeight(height);
   provider.setScreenHeight(height);
   provider.hideBottomBar();
   provider.hideBottomBar();
@@ -682,221 +635,3 @@ showBottom(context, provider) {
                 child: ReplyFullList(pCtx: context)));
                 child: ReplyFullList(pCtx: context)));
       });
       });
 }
 }
-
-
-
-
-// import 'package:camera/camera.dart';
-// import 'package:firebase_ml_vision/firebase_ml_vision.dart';
-// import 'package:flutter/foundation.dart';
-// import 'package:flutter/material.dart';
-
-// import 'detector_painters.dart';
-// import 'utils.dart';
-
-// void main() => runApp(MaterialApp(home: MyHomePage()));
-
-// class MyHomePage extends StatefulWidget {
-//   @override
-//   MyHomePageState createState() => MyHomePageState();
-// }
-
-// class MyHomePageState extends State<MyHomePage> {
-//   dynamic _scanResults;
-//   CameraController _camera;
-
-//   Detector _currentDetector = Detector.text;
-//   bool _isDetecting = false;
-//   CameraLensDirection _direction = CameraLensDirection.back;
-
-//   @override
-//   void initState() {
-//     super.initState();
-//     _initializeCamera();
-//   }
-
-//   void _initializeCamera() async {
-//     CameraDescription description = await getCamera(_direction);
-//     ImageRotation rotation = rotationIntToImageRotation(
-//       description.sensorOrientation,
-//     );
-
-//     _camera = CameraController(
-//       description,
-//       defaultTargetPlatform == TargetPlatform.iOS
-//           ? ResolutionPreset.low
-//           : ResolutionPreset.high,
-//     );
-//     await _camera.initialize();
-
-//     _camera.startImageStream((CameraImage image) {
-//       if (_isDetecting) return;
-
-//       _isDetecting = true;
-
-//       detect(image, _getDetectionMethod(), rotation).then(
-//         (dynamic result) {
-//           setState(() {
-//             _scanResults = result;
-//           });
-
-//           _isDetecting = false;
-//         },
-//       ).catchError(
-//         (_) {
-//           _isDetecting = false;
-//         },
-//       );
-//     });
-//   }
-
-//   HandleDetection _getDetectionMethod() {
-//     final FirebaseVision mlVision = FirebaseVision.instance;
-
-//     switch (_currentDetector) {
-//       case Detector.text:
-//         return mlVision.textRecognizer().processImage;
-//       case Detector.barcode:
-//         return mlVision.barcodeDetector().detectInImage;
-//       // case Detector.label:
-//       //   return mlVision.labelDetector().detectInImage;
-//       // case Detector.cloudLabel:
-//       //   return mlVision.cloudLabelDetector().detectInImage;
-//       default:
-//         assert(_currentDetector == Detector.face);
-//         return mlVision.faceDetector().processImage;
-//     }
-//   }
-
-//   Widget _buildResults() {
-//     const Text noResultsText = const Text('No results!');
-
-//     if (_scanResults == null ||
-//         _camera == null ||
-//         !_camera.value.isInitialized) {
-//       return noResultsText;
-//     }
-
-//     CustomPainter painter;
-
-//     final Size imageSize = Size(
-//       _camera.value.previewSize.height,
-//       _camera.value.previewSize.width,
-//     );
-
-//     switch (_currentDetector) {
-//       case Detector.barcode:
-//         if (_scanResults is! List<Barcode>) return noResultsText;
-//         painter = BarcodeDetectorPainter(imageSize, _scanResults);
-//         break;
-//       case Detector.face:
-//         if (_scanResults is! List<Face>) return noResultsText;
-//         painter = FaceDetectorPainter(imageSize, _scanResults);
-//         break;
-//       // case Detector.label:
-//       //   if (_scanResults is! List<Label>) return noResultsText;
-//       //   painter = LabelDetectorPainter(imageSize, _scanResults);
-//       //   break;
-//       // case Detector.cloudLabel:
-//       //   if (_scanResults is! List<Label>) return noResultsText;
-//       //   painter = LabelDetectorPainter(imageSize, _scanResults);
-//       //   break;
-//       default:
-//         assert(_currentDetector == Detector.text);
-//         if (_scanResults is! VisionText) return noResultsText;
-//         painter = TextDetectorPainter(imageSize, _scanResults);
-//     }
-
-//     return CustomPaint(
-//       painter: painter,
-//     );
-//   }
-
-//   Widget _buildImage() {
-//     return Container(
-//       constraints: const BoxConstraints.expand(),
-//       child: _camera == null
-//           ? const Center(
-//               child: Text(
-//                 'Initializing Camera...',
-//                 style: TextStyle(
-//                   color: Colors.green,
-//                   fontSize: 30.0,
-//                 ),
-//               ),
-//             )
-//           : Stack(
-//               // fit: StackFit.expand,
-//               children: <Widget>[
-//                 AspectRatio(
-//                   aspectRatio: _camera.value.aspectRatio,
-//                   child: CameraPreview(_camera)
-//                 ),
-//                 _buildResults(),
-//               ],
-//             ),
-//     );
-//   }
-
-//   void _toggleCameraDirection() async {
-//     if (_direction == CameraLensDirection.back) {
-//       _direction = CameraLensDirection.front;
-//     } else {
-//       _direction = CameraLensDirection.back;
-//     }
-
-//     await _camera.stopImageStream();
-//     await _camera.dispose();
-
-//     setState(() {
-//       _camera = null;
-//     });
-
-//     _initializeCamera();
-//   }
-
-//   @override
-//   Widget build(BuildContext context) {
-//     return Scaffold(
-//       appBar: AppBar(
-//         title: const Text('ML Vision Example'),
-//         actions: <Widget>[
-//           PopupMenuButton<Detector>(
-//             onSelected: (Detector result) {
-//               _currentDetector = result;
-//             },
-//             itemBuilder: (BuildContext context) => <PopupMenuEntry<Detector>>[
-//                   const PopupMenuItem<Detector>(
-//                     child: Text('Detect Barcode'),
-//                     value: Detector.barcode,
-//                   ),
-//                   const PopupMenuItem<Detector>(
-//                     child: Text('Detect Face'),
-//                     value: Detector.face,
-//                   ),
-//                   // const PopupMenuItem<Detector>(
-//                   //   child: Text('Detect Label'),
-//                   //   value: Detector.label,
-//                   // ),
-//                   // const PopupMenuItem<Detector>(
-//                   //   child: Text('Detect Cloud Label'),
-//                   //   value: Detector.cloudLabel,
-//                   // ),
-//                   const PopupMenuItem<Detector>(
-//                     child: Text('Detect Text'),
-//                     value: Detector.text,
-//                   ),
-//                 ],
-//           ),
-//         ],
-//       ),
-//       body: _buildImage(),
-//       floatingActionButton: FloatingActionButton(
-//         onPressed: _toggleCameraDirection,
-//         child: _direction == CameraLensDirection.back
-//             ? const Icon(Icons.camera_front)
-//             : const Icon(Icons.camera_rear),
-//       ),
-//     );
-//   }
-// }

+ 6 - 12
lib/pages/RecommendPage/BottomSheet.dart

@@ -5,14 +5,15 @@ import 'package:flutter/material.dart';
 import 'package:provider/provider.dart';
 import 'package:provider/provider.dart';
 
 
 class ReplyFullList extends StatelessWidget {
 class ReplyFullList extends StatelessWidget {
-  const ReplyFullList({Key key,this.pCtx}) : super(key: key);
+  ReplyFullList({Key key,this.pCtx}) : super(key: key);
   final BuildContext pCtx;
   final BuildContext pCtx;
+
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     double rpx = MediaQuery.of(context).size.width / 750;
     double rpx = MediaQuery.of(context).size.width / 750;
     RecommendProvider provider = Provider.of<RecommendProvider>(pCtx);
     RecommendProvider provider = Provider.of<RecommendProvider>(pCtx);
     Reply reply = provider.reply;
     Reply reply = provider.reply;
-    List<Reply> replies = List<Reply>();
+    List<Reply> replies = <Reply>[];
 
 
     replies.add(reply);
     replies.add(reply);
     replies.add(reply);
     replies.add(reply);
@@ -26,7 +27,6 @@ class ReplyFullList extends StatelessWidget {
             elevation:0,
             elevation:0,
             backgroundColor: Colors.grey[50],
             backgroundColor: Colors.grey[50],
             actions: <Widget>[
             actions: <Widget>[
-              
               IconButton(
               IconButton(
                 icon: Icon(
                 icon: Icon(
                   Icons.close,
                   Icons.close,
@@ -62,11 +62,11 @@ class ReplyList extends StatelessWidget {
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     double rpx = MediaQuery.of(context).size.width / 750;
     double rpx = MediaQuery.of(context).size.width / 750;
-    List<Reply> replies = List<Reply>();
+    List<Reply> replies = <Reply>[];
     replies.add(reply);
     replies.add(reply);
     replies.add(reply);
     replies.add(reply);
     replies.add(reply);
     replies.add(reply);
-    // RecommendProvider provider=Provider.of<RecommendProvider>(context);
+
     return Container(
     return Container(
       child: Column(
       child: Column(
         mainAxisSize: MainAxisSize.min,
         mainAxisSize: MainAxisSize.min,
@@ -153,12 +153,6 @@ class AfterReply extends StatelessWidget {
                                 TextSpan(text: "  ${afterReply.whenReplied}")
                                 TextSpan(text: "  ${afterReply.whenReplied}")
                               ]),
                               ]),
                         ),
                         ),
-
-                        // Text(
-                        //   "${afterReply.replyContent}",
-                        //   maxLines: 2,
-                        //   overflow: TextOverflow.ellipsis,
-                        // ),
                       ),
                       ),
                     )
                     )
                   ],
                   ],
@@ -237,7 +231,7 @@ class BottomReplyBar extends StatelessWidget {
 }
 }
 
 
 showAtFriendPage(BuildContext context){
 showAtFriendPage(BuildContext context){
-  Navigator.of(context).push(new MaterialPageRoute(
+  Navigator.of(context).push(MaterialPageRoute(
       builder: (BuildContext context) {
       builder: (BuildContext context) {
         return  MultiProvider(
         return  MultiProvider(
           providers: [ChangeNotifierProvider(builder:(context)=>AtUserProvider())],
           providers: [ChangeNotifierProvider(builder:(context)=>AtUserProvider())],

+ 15 - 0
lib/pages/recommend_page.dart

@@ -0,0 +1,15 @@
+import 'package:flutter/material.dart';
+
+class RecommendPage extends StatefulWidget {
+  const RecommendPage({Key key}) : super(key: key);
+
+  @override
+  _RecommendPageState createState() => _RecommendPageState();
+}
+
+class _RecommendPageState extends State<RecommendPage> {
+  @override
+  Widget build(BuildContext context) {
+    return Container();
+  }
+}

+ 23 - 27
lib/providers/AtUserProvider.dart

@@ -1,26 +1,26 @@
+import 'package:collection/collection.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:lpinyin/lpinyin.dart';
 import 'package:lpinyin/lpinyin.dart';
-import 'package:collection/collection.dart';
 
 
 class AtUserProvider with ChangeNotifier {
 class AtUserProvider with ChangeNotifier {
   int curTop = 0;
   int curTop = 0;
-  // double appHeight=80;
 
 
-  double appBtmHeight=40;
-  bool ifStick=true;
+  double appBtmHeight = 40;
+  bool ifStick = true;
 
 
   AppBar appBar = AppBar();
   AppBar appBar = AppBar();
   double appHeight;
   double appHeight;
 
 
-  List<Key> keys=List<Key>();
-  ScrollController controller=ScrollController();
-  
+  List<Key> keys = List<Key>();
+  ScrollController controller = ScrollController();
+
   List<Contact> contacts = List<Contact>();
   List<Contact> contacts = List<Contact>();
-  List<Map<String, dynamic>> dataMap=List<Map<String, dynamic>>();
-  Map<dynamic,List<dynamic>> result;
-  List<String> groupList=List<String>();
+  List<Map<String, dynamic>> dataMap = List<Map<String, dynamic>>();
+  Map<dynamic, List<dynamic>> result;
+  List<String> groupList = List<String>();
+
   AtUserProvider() {
   AtUserProvider() {
-     appHeight= appBar.preferredSize.height;
+    appHeight = appBar.preferredSize.height;
     // data.sort((a,b)=>a["name"].toString().compareTo(b["name"].toString()));
     // data.sort((a,b)=>a["name"].toString().compareTo(b["name"].toString()));
     for (var item in data) {
     for (var item in data) {
       contacts.add(Contact(
       contacts.add(Contact(
@@ -34,7 +34,8 @@ class AtUserProvider with ChangeNotifier {
         startText = startText[0];
         startText = startText[0];
       }
       }
       if (RegExp("^[\u4e00-\u9fa5]").firstMatch(startText) != null) {
       if (RegExp("^[\u4e00-\u9fa5]").firstMatch(startText) != null) {
-        contacts.last.groupCode = PinyinHelper.getShortPinyin(startText)[0].toLowerCase();
+        contacts.last.groupCode =
+            PinyinHelper.getShortPinyin(startText)[0].toLowerCase();
       } else if (RegExp("^[a-zA-Z]").firstMatch(startText) != null) {
       } else if (RegExp("^[a-zA-Z]").firstMatch(startText) != null) {
         contacts.last.groupCode = startText.toLowerCase();
         contacts.last.groupCode = startText.toLowerCase();
       } else {
       } else {
@@ -42,38 +43,33 @@ class AtUserProvider with ChangeNotifier {
       }
       }
       groupList.add(contacts.last.groupCode);
       groupList.add(contacts.last.groupCode);
       dataMap.add(Contact.toMap(contacts.last));
       dataMap.add(Contact.toMap(contacts.last));
-    } 
-    groupList=groupList.toSet().toList();
-    groupList.sort((a,b)=>a.toString().compareTo(b.toString()));
-    dataMap.sort((a,b)=>a["groupCode"].toString().compareTo(b["groupCode"].toString()));
-    result= groupBy(dataMap,(o)=>o["groupCode"]);
+    }
+    groupList = groupList.toSet().toList();
+    groupList.sort((a, b) => a.toString().compareTo(b.toString()));
+    dataMap.sort((a, b) =>
+        a["groupCode"].toString().compareTo(b["groupCode"].toString()));
+    result = groupBy(dataMap, (o) => o["groupCode"]);
     // print(result);
     // print(result);
     print('done');
     print('done');
   }
   }
 
 
-
-  // setAppHeight(height){
-  //   appHeight=height;
-  //   // notifyListeners();
-  // }
-
-  setIfStick(stick){
-    ifStick=stick;
+  setIfStick(stick) {
+    ifStick = stick;
     notifyListeners();
     notifyListeners();
   }
   }
 }
 }
 
 
-class ContactResult{
+class ContactResult {
   String key;
   String key;
   List<dynamic> value;
   List<dynamic> value;
 }
 }
 
 
-
 class Contact {
 class Contact {
   String avatarUrl;
   String avatarUrl;
   String userName;
   String userName;
   String desc;
   String desc;
   String groupCode;
   String groupCode;
+
   static Map<String, dynamic> toMap(Contact item) {
   static Map<String, dynamic> toMap(Contact item) {
     return {
     return {
       "avatarUrl": item.avatarUrl,
       "avatarUrl": item.avatarUrl,

+ 2 - 3
lib/providers/RecommendProvider.dart

@@ -1,4 +1,3 @@
-// import 'package:flutter/foundation.dart';
 import 'package:provider/provider.dart';
 import 'package:provider/provider.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 
 
@@ -7,8 +6,8 @@ class RecommendProvider extends State<StatefulWidget>
   bool ifShowBottom = true;
   bool ifShowBottom = true;
 
 
   double screenHeight;
   double screenHeight;
-  List<MainInfo> infos = List<MainInfo>();
-  List<MainInfo> followed = List<MainInfo>();
+  List<MainInfo> infos = <MainInfo>[];
+  List<MainInfo> followed = <MainInfo>[];
   TabController controller;
   TabController controller;
   MainInfo mainInfo;
   MainInfo mainInfo;
 
 

+ 1 - 1
lib/widgets/BottomBar.dart

@@ -99,7 +99,7 @@ class _BtmBarState extends State<BtmBar> {
             ModalRoute.withName("/selfHome"));
             ModalRoute.withName("/selfHome"));
         break;
         break;
       case 3:
       case 3:
-        Navigator.of(context).push(new MaterialPageRoute(
+        Navigator.of(context).push(MaterialPageRoute(
       builder: (BuildContext context) {
       builder: (BuildContext context) {
         return  MultiProvider(
         return  MultiProvider(
           providers: [
           providers: [

+ 64 - 416
pubspec.lock

@@ -1,623 +1,271 @@
 # Generated by pub
 # Generated by pub
 # See https://dart.dev/tools/pub/glossary#lockfile
 # See https://dart.dev/tools/pub/glossary#lockfile
 packages:
 packages:
-  after_layout:
-    dependency: "direct main"
-    description:
-      name: after_layout
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.0.7+2"
-  analyzer:
-    dependency: transitive
-    description:
-      name: analyzer
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.38.4"
-  archive:
-    dependency: transitive
-    description:
-      name: archive
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.0.11"
-  args:
-    dependency: transitive
-    description:
-      name: args
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.5.2"
   async:
   async:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: async
       name: async
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.4.0"
+    version: "2.8.1"
   boolean_selector:
   boolean_selector:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: boolean_selector
       name: boolean_selector
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.0.5"
-  build:
-    dependency: transitive
-    description:
-      name: build
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.2.0"
-  build_config:
-    dependency: transitive
-    description:
-      name: build_config
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.4.1+1"
-  build_daemon:
-    dependency: transitive
-    description:
-      name: build_daemon
-      url: "https://pub.flutter-io.cn"
-    source: hosted
     version: "2.1.0"
     version: "2.1.0"
-  build_resolvers:
+  characters:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: build_resolvers
+      name: characters
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.1.1"
-  build_runner:
-    dependency: "direct dev"
-    description:
-      name: build_runner
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.7.1"
-  build_runner_core:
-    dependency: transitive
-    description:
-      name: build_runner_core
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "4.1.0"
-  built_collection:
-    dependency: transitive
-    description:
-      name: built_collection
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "4.2.2"
-  built_value:
-    dependency: transitive
-    description:
-      name: built_value
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "6.7.1"
-  camera:
-    dependency: "direct main"
-    description:
-      name: camera
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.5.6"
+    version: "1.1.0"
   charcode:
   charcode:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: charcode
       name: charcode
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.1.2"
-  checked_yaml:
-    dependency: transitive
-    description:
-      name: checked_yaml
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.0.2"
-  code_builder:
+    version: "1.3.1"
+  clock:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: code_builder
+      name: clock
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "3.2.0"
+    version: "1.1.0"
   collection:
   collection:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: collection
       name: collection
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.14.11"
-  convert:
-    dependency: transitive
-    description:
-      name: convert
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.1.1"
-  crypto:
+    version: "1.15.0"
+  cross_file:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: crypto
+      name: cross_file
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.1.3"
+    version: "0.3.2"
   csslib:
   csslib:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: csslib
       name: csslib
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.16.1"
+    version: "0.17.1"
   cupertino_icons:
   cupertino_icons:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: cupertino_icons
       name: cupertino_icons
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.1.2"
-  dart_style:
+    version: "1.0.4"
+  fake_async:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: dart_style
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.3.1"
-  firebase_ml_vision:
-    dependency: "direct main"
-    description:
-      name: firebase_ml_vision
+      name: fake_async
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.9.2+2"
-  fixnum:
-    dependency: transitive
-    description:
-      name: fixnum
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.10.9"
+    version: "1.2.0"
   flutter:
   flutter:
     dependency: "direct main"
     dependency: "direct main"
     description: flutter
     description: flutter
     source: sdk
     source: sdk
     version: "0.0.0"
     version: "0.0.0"
-  flutter_page_indicator:
+  flutter_plugin_android_lifecycle:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: flutter_page_indicator
+      name: flutter_plugin_android_lifecycle
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.0.3"
-  flutter_swiper:
-    dependency: "direct main"
-    description:
-      name: flutter_swiper
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.1.6"
+    version: "2.0.5"
   flutter_test:
   flutter_test:
     dependency: "direct dev"
     dependency: "direct dev"
     description: flutter
     description: flutter
     source: sdk
     source: sdk
     version: "0.0.0"
     version: "0.0.0"
-  front_end:
-    dependency: transitive
-    description:
-      name: front_end
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.26"
-  glob:
+  flutter_web_plugins:
     dependency: transitive
     dependency: transitive
-    description:
-      name: glob
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.1.7"
-  graphs:
-    dependency: transitive
-    description:
-      name: graphs
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.2.0"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
   html:
   html:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: html
       name: html
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.14.0+3"
+    version: "0.15.0"
   http:
   http:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: http
       name: http
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.12.0+2"
-  http_multi_server:
-    dependency: transitive
-    description:
-      name: http_multi_server
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.1.0"
+    version: "0.13.4"
   http_parser:
   http_parser:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: http_parser
       name: http_parser
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "3.1.3"
-  image:
-    dependency: transitive
-    description:
-      name: image
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.1.4"
-  image_gallery_saver:
-    dependency: "direct main"
-    description:
-      name: image_gallery_saver
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.2.2"
+    version: "4.0.0"
   image_picker:
   image_picker:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: image_picker
       name: image_picker
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.6.1+8"
-  image_picker_saver:
-    dependency: "direct main"
+    version: "0.8.4+10"
+  image_picker_for_web:
+    dependency: transitive
     description:
     description:
-      name: image_picker_saver
+      name: image_picker_for_web
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.3.0"
-  io:
+    version: "2.1.6"
+  image_picker_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: io
+      name: image_picker_platform_interface
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.3.3"
+    version: "2.4.4"
   js:
   js:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: js
       name: js
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.6.1+1"
-  json_annotation:
-    dependency: "direct main"
-    description:
-      name: json_annotation
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "3.0.0"
-  json_serializable:
-    dependency: "direct dev"
-    description:
-      name: json_serializable
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "3.2.2"
-  kernel:
-    dependency: transitive
-    description:
-      name: kernel
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.3.26"
-  logging:
-    dependency: transitive
-    description:
-      name: logging
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.11.3+2"
-  lpinyin:
-    dependency: "direct main"
-    description:
-      name: lpinyin
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.0.7"
-  marquee:
-    dependency: "direct main"
-    description:
-      name: marquee
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.3.0"
-  marquee_flutter:
-    dependency: "direct main"
-    description:
-      name: marquee_flutter
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.4"
+    version: "0.6.3"
   matcher:
   matcher:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: matcher
       name: matcher
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.12.6"
+    version: "0.12.10"
   meta:
   meta:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: meta
       name: meta
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.1.8"
-  mime:
-    dependency: transitive
-    description:
-      name: mime
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.9.6+3"
-  package_config:
+    version: "1.7.0"
+  nested:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: package_config
+      name: nested
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.1.0"
-  package_resolver:
-    dependency: transitive
-    description:
-      name: package_resolver
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.0.10"
+    version: "1.0.0"
   path:
   path:
-    dependency: "direct main"
-    description:
-      name: path
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.6.4"
-  path_provider:
-    dependency: "direct main"
-    description:
-      name: path_provider
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.3.1"
-  pedantic:
-    dependency: transitive
-    description:
-      name: pedantic
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.8.0+1"
-  petitparser:
-    dependency: transitive
-    description:
-      name: petitparser
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.4.0"
-  platform:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: platform
+      name: path
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.2.1"
-  pool:
+    version: "1.8.0"
+  plugin_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: pool
+      name: plugin_platform_interface
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.4.0"
+    version: "2.1.2"
   provider:
   provider:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: provider
       name: provider
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "3.1.0"
-  pub_semver:
-    dependency: transitive
-    description:
-      name: pub_semver
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.4.2"
-  pubspec_parse:
-    dependency: transitive
-    description:
-      name: pubspec_parse
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.5"
-  quiver:
-    dependency: transitive
-    description:
-      name: quiver
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.0.5"
-  shared_preferences:
-    dependency: "direct main"
-    description:
-      name: shared_preferences
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.5.3+4"
-  shelf:
-    dependency: transitive
-    description:
-      name: shelf
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.7.5"
-  shelf_web_socket:
-    dependency: transitive
-    description:
-      name: shelf_web_socket
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.2.3"
+    version: "6.0.2"
   sky_engine:
   sky_engine:
     dependency: transitive
     dependency: transitive
     description: flutter
     description: flutter
     source: sdk
     source: sdk
     version: "0.0.99"
     version: "0.0.99"
-  source_gen:
-    dependency: transitive
-    description:
-      name: source_gen
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.9.4+5"
   source_span:
   source_span:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: source_span
       name: source_span
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.5.5"
+    version: "1.8.1"
   stack_trace:
   stack_trace:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: stack_trace
       name: stack_trace
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.9.3"
-  sticky_headers:
-    dependency: "direct main"
-    description:
-      name: sticky_headers
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.8"
+    version: "1.10.0"
   stream_channel:
   stream_channel:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: stream_channel
       name: stream_channel
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.0.0"
-  stream_transform:
-    dependency: transitive
-    description:
-      name: stream_transform
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.0.19"
-  stretchy_header:
-    dependency: "direct main"
-    description:
-      name: stretchy_header
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.0.5"
+    version: "2.1.0"
   string_scanner:
   string_scanner:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: string_scanner
       name: string_scanner
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.0.5"
+    version: "1.1.0"
   term_glyph:
   term_glyph:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: term_glyph
       name: term_glyph
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.1.0"
+    version: "1.2.0"
   test_api:
   test_api:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: test_api
       name: test_api
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.2.11"
-  timing:
-    dependency: transitive
-    description:
-      name: timing
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.1+2"
-  transformer_page_view:
-    dependency: transitive
-    description:
-      name: transformer_page_view
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.1.6"
+    version: "0.4.2"
   typed_data:
   typed_data:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: typed_data
       name: typed_data
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "1.1.6"
-  uuid:
-    dependency: "direct main"
-    description:
-      name: uuid
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "2.0.2"
+    version: "1.3.0"
   vector_math:
   vector_math:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: vector_math
       name: vector_math
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.0.8"
+    version: "2.1.0"
   video_player:
   video_player:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: video_player
       name: video_player
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "0.10.2+1"
-  watcher:
-    dependency: transitive
-    description:
-      name: watcher
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "0.9.7+12"
-  web_socket_channel:
-    dependency: transitive
-    description:
-      name: web_socket_channel
-      url: "https://pub.flutter-io.cn"
-    source: hosted
-    version: "1.0.15"
-  xml:
+    version: "2.2.17"
+  video_player_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: xml
+      name: video_player_platform_interface
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "3.5.0"
-  yaml:
+    version: "5.1.0"
+  video_player_web:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: yaml
+      name: video_player_web
       url: "https://pub.flutter-io.cn"
       url: "https://pub.flutter-io.cn"
     source: hosted
     source: hosted
-    version: "2.2.0"
+    version: "2.0.7"
 sdks:
 sdks:
-  dart: ">=2.4.0 <3.0.0"
-  flutter: ">=1.6.7 <2.0.0"
+  dart: ">=2.14.0 <3.0.0"
+  flutter: ">=2.5.0"

+ 24 - 73
pubspec.yaml

@@ -1,67 +1,44 @@
 name: douyin_demo
 name: douyin_demo
 description: A new Flutter project.
 description: A new Flutter project.
-
-# The following defines the version and build number for your application.
-# A version number is three numbers separated by dots, like 1.2.43
-# followed by an optional build number separated by a +.
-# Both the version and the builder number may be overridden in flutter
-# build by specifying --build-name and --build-number, respectively.
-# In Android, build-name is used as versionName while build-number used as versionCode.
-# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
-# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
-# Read more about iOS versioning at
-# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 version: 1.0.0+1
 version: 1.0.0+1
 
 
 environment:
 environment:
-  sdk: ">=2.1.0 <3.0.0"
+  sdk: ">=2.7.0 <3.0.0"
 
 
 dependencies:
 dependencies:
   flutter:
   flutter:
     sdk: flutter
     sdk: flutter
 
 
-  # The following adds the Cupertino Icons font to your application.
-  # Use with the CupertinoIcons class for iOS style icons.
-  cupertino_icons: ^0.1.2
-  marquee: 
-  video_player: 
-  marquee_flutter:
-  provider: 
-  lpinyin:
-  sticky_headers:
-  shared_preferences: ^0.5.3
-  json_annotation:
-  flutter_swiper:
-  stretchy_header:
-  after_layout:
-  camera:
-  path_provider:
-  path:
-  uuid:
-  image_picker_saver:
-  image_gallery_saver:
-  firebase_ml_vision:
-  image_picker:
-    
+  cupertino_icons: ^1.0.3
+#  marquee:
+  video_player: ^2.2.17
+#  marquee_flutter:
+  provider: ^6.0.1
+#  lpinyin:
+#  sticky_headers:
+#  shared_preferences: ^0.5.3
+#  json_annotation:
+#  flutter_swiper:
+#  stretchy_header:
+#  after_layout:
+#  camera:
+#  path_provider:
+#  path:
+#  uuid:
+#  image_picker_saver:
+#  image_gallery_saver:
+#  firebase_ml_vision:
+  image_picker: ^0.8.4+4
+
 dev_dependencies:
 dev_dependencies:
   flutter_test:
   flutter_test:
     sdk: flutter
     sdk: flutter
-  build_runner: 
-  json_serializable: 
-
-
-# For information on the generic Dart part of this file, see the
-# following page: https://dart.dev/tools/pub/pubspec
+#  build_runner:
+#  json_serializable:
 
 
-# The following section is specific to Flutter.
 flutter:
 flutter:
 
 
-  # The following line ensures that the Material Icons font is
-  # included with your application, so that you can use the icons in
-  # the material Icons class.
   uses-material-design: true
   uses-material-design: true
-
-  # To add assets to your application, add an assets section, like this:
   assets:
   assets:
    - lib/images/pingguo.jpeg
    - lib/images/pingguo.jpeg
    - lib/images/sky.jpg
    - lib/images/sky.jpg
@@ -73,29 +50,3 @@ flutter:
    - lib/images/waterdrop.jpg
    - lib/images/waterdrop.jpg
   #  - lib/images/aaa.png
   #  - lib/images/aaa.png
   #  - images/a_dot_ham.jpeg
   #  - images/a_dot_ham.jpeg
-
-  # An image asset can refer to one or more resolution-specific "variants", see
-  # https://flutter.dev/assets-and-images/#resolution-aware.
-
-  # For details regarding adding assets from package dependencies, see
-  # https://flutter.dev/assets-and-images/#from-packages
-
-  # To add custom fonts to your application, add a fonts section here,
-  # in this "flutter" section. Each entry in this list should have a
-  # "family" key with the font family name, and a "fonts" key with a
-  # list giving the asset and other descriptors for the font. For
-  # example:
-  # fonts:
-  #   - family: Schyler
-  #     fonts:
-  #       - asset: fonts/Schyler-Regular.ttf
-  #       - asset: fonts/Schyler-Italic.ttf
-  #         style: italic
-  #   - family: Trajan Pro
-  #     fonts:
-  #       - asset: fonts/TrajanPro.ttf
-  #       - asset: fonts/TrajanPro_Bold.ttf
-  #         weight: 700
-  #
-  # For details regarding fonts from package dependencies,
-  # see https://flutter.dev/custom-fonts/#from-packages