diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 8824314..d1519da 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.11/","dependencies":[]},{"name":"share","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.4+3/","dependencies":[]},{"name":"shared_preferences","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.5.0/","dependencies":[]},{"name":"webview_flutter","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.22+1/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.11/","dependencies":[]},{"name":"share","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.4+3/","dependencies":[]},{"name":"shared_preferences","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.5.0/","dependencies":[]},{"name":"webview_flutter","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.22+1/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+7/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+1/","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"share","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2020-08-07 20:04:51.897760","version":"1.20.0"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.11/","dependencies":[]},{"name":"share","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.4+3/","dependencies":[]},{"name":"shared_preferences","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.5.0/","dependencies":[]},{"name":"webview_flutter","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.22+1/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.11/","dependencies":[]},{"name":"share","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.4+3/","dependencies":[]},{"name":"shared_preferences","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.5.0/","dependencies":[]},{"name":"webview_flutter","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.22+1/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+7/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+1/","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"share","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2020-08-08 16:51:01.509294","version":"1.20.1"} \ No newline at end of file diff --git a/lib/category/widgets/appstructurenavigation/navigationrail.dart b/lib/category/widgets/appstructurenavigation/navigationrail.dart index 1b0a12a..31f2494 100644 --- a/lib/category/widgets/appstructurenavigation/navigationrail.dart +++ b/lib/category/widgets/appstructurenavigation/navigationrail.dart @@ -15,10 +15,13 @@ class _NavigationRailWidgetState extends State { NavigationRail( selectedIndex: _selectedIndex, onDestinationSelected: (int index) { - setState(() { - _selectedIndex = index; - }); + setState(() => _selectedIndex = index); }, + leading: IconButton( + icon: Icon(Icons.tune), + color: Colors.red.shade200, + onPressed: () {}, + ), labelType: NavigationRailLabelType.selected, destinations: [ NavigationRailDestination( diff --git a/lib/pages/feed/feedmainpage.dart b/lib/pages/feed/feedmainpage.dart index e979296..a7dd9f1 100644 --- a/lib/pages/feed/feedmainpage.dart +++ b/lib/pages/feed/feedmainpage.dart @@ -33,7 +33,8 @@ class FeedMainPage extends StatelessWidget { } var detail = feedList[index]; return GestureDetector( - onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => FeedDetailPage(article: detail))), + onTap: () => Navigator.push( + context, MaterialPageRoute(builder: (context) => FeedDetailPage(article: detail))), child: Card( elevation: 2, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), @@ -86,9 +87,14 @@ class FeedMainPage extends StatelessWidget { margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), child: Row( children: [ - CircleAvatar( - radius: 12, - backgroundImage: NetworkImage('${detail.owner.avatarUrl}'), + Icon(Icons.star, color: Colors.redAccent.withAlpha(125)), + SizedBox(width: 4), + Text( + '${detail.stargazersCount}', + style: TextStyle( + fontSize: 14, + color: Colors.grey.shade700, + ), ), SizedBox(width: 24), Text( @@ -100,7 +106,17 @@ class FeedMainPage extends StatelessWidget { ), SizedBox(width: 24), Text( - '${formatDate(DateTime.parse(detail.createdAt), [yyyy, '-', mm, '-', dd, ' ', HH, ':', nn])}', + '${formatDate(DateTime.parse(detail.createdAt), [ + yyyy, + '-', + mm, + '-', + dd, + ' ', + HH, + ':', + nn + ])}', style: TextStyle( fontSize: 12, color: Colors.grey.shade500, @@ -129,7 +145,7 @@ class FeedListViewModel with ChangeNotifier { int pageIndex = 0; void getFlutterFeedList() async { - var feedEntity = await client.getTagDataList('android+in:description,name', 'updated', 'desc', pageIndex, 10); + var feedEntity = await client.getTagDataList('flutter+in:description,name', 'updated', 'desc', pageIndex, 10); var list = feedEntity.items; if (list.length > 0) { pageIndex++; diff --git a/lib/pages/feed/restclient.dart b/lib/pages/feed/restclient.dart index 52838e5..0b90fcd 100644 --- a/lib/pages/feed/restclient.dart +++ b/lib/pages/feed/restclient.dart @@ -4,6 +4,8 @@ import 'package:retrofit/retrofit.dart'; part 'restclient.g.dart'; +/// Step 1: flutter pub upgrade +/// Step 2: flutter pub run build_runner build @RestApi(baseUrl: 'https://api.github.com/search/') abstract class RestClient { factory RestClient(Dio dio, {String baseUrl}) = _RestClient; diff --git a/pubspec.yaml b/pubspec.yaml index 6ae553b..442ac3a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: A new Flutter application. # 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: 3.0.0+2 +version: 3.1.0+3 environment: sdk: ">=2.7.0 <3.0.0"