jianboy 1 year ago
parent
commit
78263a91a1

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


+ 1 - 0
.gitignore

@@ -8,3 +8,4 @@ build/
 ios/.generated/
 packages
 .flutter-plugins
+.dart_tool/

+ 3 - 9
android/app/build.gradle

@@ -19,7 +19,7 @@ def keystoreProperties = new Properties()
 keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
 
 android {
-    compileSdkVersion 28
+    compileSdkVersion 31
 
     lintOptions {
         disable 'InvalidPackage'
@@ -27,8 +27,8 @@ android {
 
     defaultConfig {
         applicationId "com.yubo.flutterosc"
-        minSdkVersion 16
-        targetSdkVersion 28
+        minSdkVersion 18
+        targetSdkVersion 31
         versionCode 2
         versionName "1.0.1"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -52,9 +52,3 @@ android {
 flutter {
     source '../..'
 }
-
-dependencies {
-//    testImplementation 'junit:junit:4.12'
-//    androidTestImplementation 'com.android.support.test:runner:1.0.1'
-//    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
-}

+ 4 - 10
android/app/src/main/AndroidManifest.xml

@@ -1,20 +1,11 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.yubo.flutterosc">
 
-    <!-- The INTERNET permission is required for development. Specifically,
-         flutter needs it to communicate with the running application
-         to allow setting breakpoints, to provide hot reload, etc.
-    -->
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.CAMERA" />
 
-    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
-         calls FlutterMain.startInitialization(this); in its onCreate method.
-         In most cases you can leave this as-is, but you if you want to provide
-         additional functionality it is fine to subclass or reimplement
-         FlutterApplication and put your custom class here. -->
+
     <application
-        android:name="io.flutter.app.FlutterApplication"
         android:label="flutter_osc"
         android:icon="@mipmap/ic_launcher">
         <activity
@@ -37,5 +28,8 @@
             </intent-filter>
         </activity>
         <activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"/>
+        <meta-data
+            android:name="flutterEmbedding"
+            android:value="2" />
     </application>
 </manifest>

+ 1 - 9
android/app/src/main/java/com/yubo/flutterosc/MainActivity.java

@@ -1,14 +1,6 @@
 package com.yubo.flutterosc;
 
-import android.os.Bundle;
-
-import io.flutter.app.FlutterActivity;
-import io.flutter.plugins.GeneratedPluginRegistrant;
+import io.flutter.embedding.android.FlutterActivity;
 
 public class MainActivity extends FlutterActivity {
-  @Override
-  protected void onCreate(Bundle savedInstanceState) {
-    super.onCreate(savedInstanceState);
-    GeneratedPluginRegistrant.registerWith(this);
-  }
 }

+ 1 - 1
android/build.gradle

@@ -5,7 +5,7 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.4.2'
+        classpath 'com.android.tools.build:gradle:4.1.0'
     }
 }
 

+ 2 - 0
android/gradle.properties

@@ -1 +1,3 @@
 org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true

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

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

+ 13 - 0
android/gradlew

@@ -0,0 +1,13 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=/home/gitpod/flutter"
+export "FLUTTER_APPLICATION_PATH=/workspace/Leuke/1/FlutterOSC"
+export "COCOAPODS_PARALLEL_CODE_SIGN=true"
+export "FLUTTER_TARGET=lib/main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "FLUTTER_BUILD_NAME=1.0.0"
+export "FLUTTER_BUILD_NUMBER=1"
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=false"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=.packages"

+ 12 - 22
lib/main.dart

@@ -74,41 +74,32 @@ class MyOSCClientState extends State<MyOSCClient> {
     return tabImages[curIndex][0];
   }
 
-  Text getTabTitle(int curIndex) {
-    return Text(appBarTitles[curIndex], style: getTabTextStyle(curIndex));
+  String getTabTitle(int curIndex) {
+    return appBarTitles[
+        curIndex]; //Text(appBarTitles[curIndex], style: getTabTextStyle(curIndex));
   }
 
   @override
   Widget build(BuildContext context) {
     initData();
     return MaterialApp(
-      theme: ThemeData(
-          primaryColor: const Color(0xFF63CA6C)
-      ),
+      theme: ThemeData(primaryColor: const Color(0xFF63CA6C)),
       home: Scaffold(
         appBar: AppBar(
-          title: Text(appBarTitles[_tabIndex], style: TextStyle(color: Colors.white)),
-          iconTheme: IconThemeData(color: Colors.white)
-        ),
+            title: Text(appBarTitles[_tabIndex],
+                style: TextStyle(color: Colors.white)),
+            iconTheme: IconThemeData(color: Colors.white)),
         body: _body,
         bottomNavigationBar: CupertinoTabBar(
           items: <BottomNavigationBarItem>[
-            BottomNavigationBarItem(
-                icon: getTabIcon(0),
-                title: getTabTitle(0)),
-            BottomNavigationBarItem(
-                icon: getTabIcon(1),
-                title: getTabTitle(1)),
-            BottomNavigationBarItem(
-                icon: getTabIcon(2),
-                title: getTabTitle(2)),
-            BottomNavigationBarItem(
-                icon: getTabIcon(3),
-                title: getTabTitle(3)),
+            BottomNavigationBarItem(icon: getTabIcon(0), label: getTabTitle(0)),
+            BottomNavigationBarItem(icon: getTabIcon(1), label: getTabTitle(1)),
+            BottomNavigationBarItem(icon: getTabIcon(2), label: getTabTitle(2)),
+            BottomNavigationBarItem(icon: getTabIcon(3), label: getTabTitle(3)),
           ],
           currentIndex: _tabIndex,
           onTap: (index) {
-            setState((){
+            setState(() {
               _tabIndex = index;
             });
           },
@@ -118,4 +109,3 @@ class MyOSCClientState extends State<MyOSCClient> {
     );
   }
 }
-

+ 2 - 2
lib/pages/AboutPage.dart

@@ -16,8 +16,8 @@ class AboutPageState extends State<AboutPage> {
       color: Colors.blue,
       decoration: TextDecoration.combine([TextDecoration.underline]));
   Widget authorLink, mayunLink, githubLink;
-  List<String> urls = List();
-  List<String> titles = List();
+  List<String> urls = [];
+  List<String> titles = [];
 
   AboutPageState() {
     titles.add("yubo's blog");

+ 41 - 40
lib/pages/DiscoveryPage.dart

@@ -5,7 +5,6 @@ import 'CommonWebPage.dart';
 import 'package:barcode_scan/barcode_scan.dart';
 
 class DiscoveryPage extends StatelessWidget {
-
   static const String TAG_START = "startDivider";
   static const String TAG_END = "endDivider";
   static const String TAG_CENTER = "centerDivider";
@@ -23,10 +22,12 @@ class DiscoveryPage extends StatelessWidget {
     "images/ic_discover_nearby.png",
     "images/ic_discover_pos.png",
   ];
-  final titles = [
-    "开源软件", "码云推荐", "代码片段", "扫一扫", "摇一摇", "码云封面人物", "线下活动"
-  ];
-  final rightArrowIcon = Image.asset('images/ic_arrow_right.png', width: ARROW_ICON_WIDTH, height: ARROW_ICON_WIDTH,);
+  final titles = ["开源软件", "码云推荐", "代码片段", "扫一扫", "摇一摇", "码云封面人物", "线下活动"];
+  final rightArrowIcon = Image.asset(
+    'images/ic_arrow_right.png',
+    width: ARROW_ICON_WIDTH,
+    height: ARROW_ICON_WIDTH,
+  );
   final titleTextStyle = TextStyle(fontSize: 16.0);
   List listData = [];
 
@@ -69,7 +70,8 @@ class DiscoveryPage extends StatelessWidget {
   Widget getIconImage(path) {
     return Padding(
       padding: const EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 0.0),
-      child: Image.asset(path, width: IMAGE_ICON_WIDTH, height: IMAGE_ICON_WIDTH),
+      child:
+          Image.asset(path, width: IMAGE_ICON_WIDTH, height: IMAGE_ICON_WIDTH),
     );
   }
 
@@ -78,15 +80,21 @@ class DiscoveryPage extends StatelessWidget {
     if (item is String) {
       switch (item) {
         case TAG_START:
-          return Divider(height: 1.0,);
+          return Divider(
+            height: 1.0,
+          );
           break;
         case TAG_END:
-          return Divider(height: 1.0,);
+          return Divider(
+            height: 1.0,
+          );
           break;
         case TAG_CENTER:
           return Padding(
             padding: const EdgeInsets.fromLTRB(50.0, 0.0, 0.0, 0.0),
-            child: Divider(height: 1.0,),
+            child: Divider(
+              height: 1.0,
+            ),
           );
           break;
         case TAG_BLANK:
@@ -96,14 +104,16 @@ class DiscoveryPage extends StatelessWidget {
           break;
       }
     } else if (item is ListItem) {
-      var listItemContent =  Padding(
+      var listItemContent = Padding(
         padding: const EdgeInsets.fromLTRB(10.0, 15.0, 10.0, 15.0),
         child: Row(
           children: [
             getIconImage(item.icon),
             Expanded(
-                child: Text(item.title, style: titleTextStyle,)
-            ),
+                child: Text(
+              item.title,
+              style: titleTextStyle,
+            )),
             rightArrowIcon
           ],
         ),
@@ -122,41 +132,33 @@ class DiscoveryPage extends StatelessWidget {
     if (title == "扫一扫") {
       scan();
     } else if (title == "线下活动") {
-      Navigator.of(ctx).push(MaterialPageRoute(
-        builder: (context) {
-          return OfflineActivityPage();
-        }
-      ));
+      Navigator.of(ctx).push(MaterialPageRoute(builder: (context) {
+        return OfflineActivityPage();
+      }));
     } else if (title == "码云推荐") {
-      Navigator.of(ctx).push(MaterialPageRoute(
-          builder: (context) {
-            return CommonWebPage(title: "码云推荐", url: "https://m.gitee.com/explore");
-          }
-      ));
+      Navigator.of(ctx).push(MaterialPageRoute(builder: (context) {
+        return CommonWebPage(title: "码云推荐", url: "https://m.gitee.com/explore");
+      }));
     } else if (title == "代码片段") {
-      Navigator.of(ctx).push(MaterialPageRoute(
-          builder: (context) {
-            return CommonWebPage(title: "代码片段", url: "https://m.gitee.com/gists");
-          }
-      ));
+      Navigator.of(ctx).push(MaterialPageRoute(builder: (context) {
+        return CommonWebPage(title: "代码片段", url: "https://m.gitee.com/gists");
+      }));
     } else if (title == "开源软件") {
-      Navigator.of(ctx).push(MaterialPageRoute(
-          builder: (context) {
-            return CommonWebPage(title: "开源软件", url: "https://m.gitee.com/explore");
-          }
-      ));
+      Navigator.of(ctx).push(MaterialPageRoute(builder: (context) {
+        return CommonWebPage(title: "开源软件", url: "https://m.gitee.com/explore");
+      }));
     } else if (title == "码云封面人物") {
-      Navigator.of(ctx).push(MaterialPageRoute(
-          builder: (context) {
-            return CommonWebPage(title: "码云封面人物", url: "https://m.gitee.com/gitee-stars/");
-          }
-      ));
+      Navigator.of(ctx).push(MaterialPageRoute(builder: (context) {
+        return CommonWebPage(
+            title: "码云封面人物", url: "https://m.gitee.com/gitee-stars/");
+      }));
     }
   }
 
   Future scan() async {
     try {
-      String barcode = await BarcodeScanner.scan();
+      ScanResult scanResult = await BarcodeScanner.scan();
+     String barcode = scanResult.rawContent.toString();
       print(barcode);
     } on Exception catch (e) {
       print(e);
@@ -173,11 +175,10 @@ class DiscoveryPage extends StatelessWidget {
       ),
     );
   }
-
 }
 
 class ListItem {
   String icon;
   String title;
   ListItem({this.icon, this.title});
-}
+}

+ 2 - 3
lib/pages/MyInfoPage.dart

@@ -1,7 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_osc/constants/Constants.dart';
 import 'package:flutter_osc/events/LoginEvent.dart';
-import 'package:flutter_osc/events/LogoutEvent.dart';
 import '../pages/CommonWebPage.dart';
 import '../pages/LoginPage.dart';
 import 'dart:convert';
@@ -52,11 +51,11 @@ class MyInfoPageState extends State<MyInfoPage> {
   void initState() {
     super.initState();
     _showUserInfo();
-    Constants.eventBus.on(LogoutEvent).listen((event) {
+    Constants.eventBus.on().listen((event) {
       // 收到退出登录的消息,刷新个人信息显示
       _showUserInfo();
     });
-    Constants.eventBus.on(LoginEvent).listen((event) {
+    Constants.eventBus.on().listen((event) {
       // 收到登录的消息,重新获取个人信息
       getUserInfo();
     });

+ 1 - 1
lib/pages/NewsListPage.dart

@@ -82,7 +82,7 @@ class NewsListPageState extends State<NewsListPage> {
               listData = _listData;
               slideData = _slideData;
             } else {
-              List list1 = List();
+              List list1 = [];
               list1.addAll(listData);
               list1.addAll(_listData);
               if (list1.length >= listTotalSize) {

+ 3 - 4
lib/pages/PublishTweetPage.dart

@@ -3,9 +3,8 @@ import 'dart:convert';
 import 'dart:io';
 import 'package:async/async.dart';
 import 'package:flutter/material.dart';
-import 'package:http/http.dart';
-import '../api/Api.dart';
 import 'package:http/http.dart' as http;
+import '../api/Api.dart';
 import '../util/DataUtils.dart';
 import 'package:image_picker/image_picker.dart';
 
@@ -19,7 +18,7 @@ class PublishTweetPage extends StatefulWidget {
 class PublishTweetPageState extends State<PublishTweetPage> {
 
   TextEditingController _controller = TextEditingController();
-  List<File> fileList = List();
+  List<File> fileList = [];
   Future<File> _imageFile;
   bool isLoading = false;
   String msg = "";
@@ -170,7 +169,7 @@ class PublishTweetPageState extends State<PublishTweetPage> {
       Map<String, String> params = Map();
       params['msg'] = content;
       params['access_token'] = token;
-      var request = MultipartRequest('POST', Uri.parse(Api.PUB_TWEET));
+      var request = http.MultipartRequest('POST', Uri.parse(Api.PUB_TWEET));
       request.fields.addAll(params);
       if (fileList != null && fileList.length > 0) {
         for (File f in fileList) {

+ 2 - 2
lib/pages/TweetDetailPage.dart

@@ -60,11 +60,11 @@ class TweetDetailPageState extends State<TweetDetailPage> {
               if (!isLoadMore) {
                 commentList = json.decode(data)['commentList'];
                 if (commentList == null) {
-                  commentList = List();
+                  commentList = [];
                 }
               } else {
                 // 加载更多数据
-                List list = List();
+                List list = [];
                 list.addAll(commentList);
                 list.addAll(json.decode(data)['commentList']);
                 if (list.length >= tweetData['commentCount']) {

+ 4 - 4
lib/pages/TweetsListPage.dart

@@ -39,12 +39,12 @@ class TweetsListPageState extends State<TweetsListPage> {
         this.isUserLogin = isLogin;
       });
     });
-    Constants.eventBus.on(LoginEvent).listen((event) {
+    Constants.eventBus.on().listen((event) {
       setState(() {
         this.isUserLogin = true;
       });
     });
-    Constants.eventBus.on(LogoutEvent).listen((event) {
+    Constants.eventBus.on().listen((event) {
       setState(() {
         this.isUserLogin = false;
       });
@@ -97,7 +97,7 @@ class TweetsListPageState extends State<TweetsListPage> {
               }
             } else {
               // load more
-              List list = List();
+              List list = [];
               list.addAll(normalTweetsList);
               list.addAll(obj['tweetlist']);
               normalTweetsList = list;
@@ -114,7 +114,7 @@ class TweetsListPageState extends State<TweetsListPage> {
   filterList(List<dynamic> objList, bool isHot) {
     BlackListUtils.getBlackListIds().then((intList) {
       if (intList != null && intList.isNotEmpty && objList != null) {
-        List newList = List();
+        List newList = [];
         for (dynamic item in objList) {
           int authorId = item['authorid'];
           if (!intList.contains(authorId)) {

+ 3 - 3
lib/util/BlackListUtils.dart

@@ -11,7 +11,7 @@ class BlackListUtils {
     if (objList == null || objList.isEmpty) {
       return List<int>();
     }
-    List<int> intList = List();
+    List<int> intList = [];
     for (var obj in objList) {
       intList.add(obj['authorid']);
     }
@@ -23,7 +23,7 @@ class BlackListUtils {
     if (str != null && str.length > 0) {
       List<String> list = str.split(",");
       if (list != null && list.isNotEmpty) {
-        List<int> intList = List();
+        List<int> intList = [];
         for (String s in list) {
           intList.add(int.parse(s));
         }
@@ -81,7 +81,7 @@ class BlackListUtils {
         return list;
       }
     } else {
-      List<int> l = List();
+      List<int> l = [];
       l.add(id);
       String str = await saveBlackListIds(l);
       return _str2intList(str);

+ 1 - 1
lib/util/Utf8Utils.dart

@@ -21,7 +21,7 @@ class Utf8Utils {
     }
     List<String> list = encodeStr.split(",");
     if (list != null && list.isNotEmpty) {
-      List<int> intList = List();
+      List<int> intList = [];
       for (String s in list) {
         intList.add(int.parse(s));
       }

+ 230 - 50
pubspec.lock

@@ -1,55 +1,97 @@
 # Generated by pub
-# See https://www.dartlang.org/tools/pub/glossary#lockfile
+# See https://dart.dev/tools/pub/glossary#lockfile
 packages:
   async:
     dependency: transitive
     description:
       name: async
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.1.0"
+    version: "2.8.2"
   barcode_scan:
     dependency: "direct main"
     description:
       name: barcode_scan
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.0.8"
+    version: "3.0.1"
   boolean_selector:
     dependency: transitive
     description:
       name: boolean_selector
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.0"
+  characters:
+    dependency: transitive
+    description:
+      name: characters
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.0.4"
+    version: "1.2.0"
   charcode:
     dependency: transitive
     description:
       name: charcode
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.2"
+    version: "1.3.1"
+  clock:
+    dependency: transitive
+    description:
+      name: clock
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.1.0"
   collection:
     dependency: transitive
     description:
       name: collection
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.14.11"
+    version: "1.15.0"
   cupertino_icons:
     dependency: "direct main"
     description:
       name: cupertino_icons
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.1.2"
+    version: "1.0.5"
   event_bus:
     dependency: "direct main"
     description:
       name: event_bus
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.1.1"
+  fake_async:
+    dependency: transitive
+    description:
+      name: fake_async
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.2.0"
+  ffi:
+    dependency: transitive
+    description:
+      name: ffi
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.2.1"
+  file:
+    dependency: transitive
+    description:
+      name: file
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "6.1.2"
+  fixnum:
+    dependency: transitive
+    description:
+      name: fixnum
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.10.11"
   flutter:
     dependency: "direct main"
     description: flutter
@@ -60,62 +102,186 @@ packages:
     description: flutter
     source: sdk
     version: "0.0.0"
+  flutter_web_plugins:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
   flutter_webview_plugin:
     dependency: "direct main"
     description:
       name: flutter_webview_plugin
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.3.7"
+    version: "0.4.0"
+  http:
+    dependency: "direct main"
+    description:
+      name: http
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.12.2"
+  http_parser:
+    dependency: transitive
+    description:
+      name: http_parser
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.1.4"
   image_picker:
     dependency: "direct main"
     description:
       name: image_picker
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
     version: "0.4.12+1"
+  js:
+    dependency: transitive
+    description:
+      name: js
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.6.3"
   matcher:
     dependency: transitive
     description:
       name: matcher
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.12.11"
+  material_color_utilities:
+    dependency: transitive
+    description:
+      name: material_color_utilities
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.12.5"
+    version: "0.1.3"
   meta:
     dependency: transitive
     description:
       name: meta
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.6"
+    version: "1.7.0"
   path:
     dependency: transitive
     description:
       name: path
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.8.0"
+  path_provider_linux:
+    dependency: transitive
+    description:
+      name: path_provider_linux
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.7"
+  path_provider_platform_interface:
+    dependency: transitive
+    description:
+      name: path_provider_platform_interface
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.6.2"
+    version: "2.0.4"
+  path_provider_windows:
+    dependency: transitive
+    description:
+      name: path_provider_windows
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.7"
   pedantic:
     dependency: transitive
     description:
       name: pedantic
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.11.1"
+  platform:
+    dependency: transitive
+    description:
+      name: platform
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "3.1.0"
+  plugin_platform_interface:
+    dependency: transitive
+    description:
+      name: plugin_platform_interface
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.2"
+  process:
+    dependency: transitive
+    description:
+      name: process
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.5.0"
-  quiver:
+    version: "4.2.4"
+  protobuf:
     dependency: transitive
     description:
-      name: quiver
-      url: "https://pub.flutter-io.cn"
+      name: protobuf
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.0.2"
+    version: "1.1.4"
   shared_preferences:
     dependency: "direct main"
     description:
       name: shared_preferences
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.15"
+  shared_preferences_android:
+    dependency: transitive
+    description:
+      name: shared_preferences_android
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.12"
+  shared_preferences_ios:
+    dependency: transitive
+    description:
+      name: shared_preferences_ios
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.1"
+  shared_preferences_linux:
+    dependency: transitive
+    description:
+      name: shared_preferences_linux
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.1"
+  shared_preferences_macos:
+    dependency: transitive
+    description:
+      name: shared_preferences_macos
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.4"
+  shared_preferences_platform_interface:
+    dependency: transitive
+    description:
+      name: shared_preferences_platform_interface
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.0"
+  shared_preferences_web:
+    dependency: transitive
+    description:
+      name: shared_preferences_web
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.0.4"
+  shared_preferences_windows:
+    dependency: transitive
+    description:
+      name: shared_preferences_windows
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.4.3"
+    version: "2.1.1"
   sky_engine:
     dependency: transitive
     description: flutter
@@ -125,58 +291,72 @@ packages:
     dependency: transitive
     description:
       name: source_span
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.5.5"
+    version: "1.8.1"
   stack_trace:
     dependency: transitive
     description:
       name: stack_trace
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.9.3"
+    version: "1.10.0"
   stream_channel:
     dependency: transitive
     description:
       name: stream_channel
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.0.0"
+    version: "2.1.0"
   string_scanner:
     dependency: transitive
     description:
       name: string_scanner
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.0.4"
+    version: "1.1.0"
   term_glyph:
     dependency: transitive
     description:
       name: term_glyph
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.0"
+    version: "1.2.0"
   test_api:
     dependency: transitive
     description:
       name: test_api
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.2.4"
+    version: "0.4.8"
   typed_data:
     dependency: transitive
     description:
       name: typed_data
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.1.6"
+    version: "1.3.0"
   vector_math:
     dependency: transitive
     description:
       name: vector_math
-      url: "https://pub.flutter-io.cn"
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.1"
+  win32:
+    dependency: transitive
+    description:
+      name: win32
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.5.2"
+  xdg_directories:
+    dependency: transitive
+    description:
+      name: xdg_directories
+      url: "https://pub.dartlang.org"
     source: hosted
-    version: "2.0.8"
+    version: "0.2.0+1"
 sdks:
-  dart: ">=2.2.0 <3.0.0"
-  flutter: ">=0.1.4 <2.0.0"
+  dart: ">=2.15.0 <3.0.0"
+  flutter: ">=2.8.0"

+ 13 - 46
pubspec.yaml

@@ -1,38 +1,31 @@
 name: flutter_osc
 description: A new Flutter application.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+version: 1.0.0+1
+
+environment:
+  sdk: ">=2.7.0 <3.0.0"
 
 dependencies:
   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.0
-
-  flutter_webview_plugin: "^0.3.7"
-  image_picker: "^0.4.1"
-#  fluttertoast: "^2.0.3"
-  shared_preferences: "^0.4.1"
-  event_bus: "^1.1.0"
-  barcode_scan: "^0.0.4"
+  cupertino_icons: ^1.0.3
+  flutter_webview_plugin: ^0.4.0
+  image_picker: ^0.4.1
+#  fluttertoast: ^2.0.3
+  shared_preferences: ^2.0.7
+  event_bus: ^1.1.0
+  barcode_scan: ^3.0.1
+  http:  ^0.12.0+4
 
 dev_dependencies:
   flutter_test:
     sdk: flutter
 
-
-# For information on the generic Dart part of this file, see the
-# following page: https://www.dartlang.org/tools/pub/pubspec
-
-# The following section is specific to 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
 
-  # To add assets to your application, add an assets section, like this:
   assets:
     - images/ic_avatar_default.png
     - images/ic_nav_news_normal.png
@@ -67,29 +60,3 @@ flutter:
     - images/leftmenu/ic_settings.png
     - images/ic_osc_logo.png
     - images/ic_add_pics.png
-
-  # An image asset can refer to one or more resolution-specific "variants", see
-  # https://flutter.io/assets-and-images/#resolution-aware.
-
-  # For details regarding adding assets from package dependencies, see
-  # https://flutter.io/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: Msyh
-#      fonts:
-#        - asset: fonts/Msyh.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.io/custom-fonts/#from-packages

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