diff --git a/wallpaper/lib/pages/homepage/homepage_view.dart b/wallpaper/lib/pages/homepage/homepage_view.dart index 35080f5..7fe2c37 100644 --- a/wallpaper/lib/pages/homepage/homepage_view.dart +++ b/wallpaper/lib/pages/homepage/homepage_view.dart @@ -1,17 +1,34 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; +import 'package:transparent_image/transparent_image.dart'; class HomePageView extends GetView { const HomePageView({super.key}); @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text("壁纸"), - ), - body: const Center( - child: Text("xxxxx"), + const title = "壁纸"; + + return MaterialApp( + title: title, + home: Scaffold( + appBar: AppBar( + title: const Text(title), + ), + body: GridView.count( + // Create a grid with 2 columns. If you change the scrollDirection to + // horizontal, this produces 2 rows. + crossAxisCount: 2, + // Generate 100 widgets that display their index in the List. + children: List.generate(100, (index) { + return Center( + child: FadeInImage.memoryNetwork( + placeholder: kTransparentImage, + image: 'https://picsum.photos/250?image=9', + ), + ); + }), + ), ), ); } diff --git a/wallpaper/lib/pages/tabarpage/tabarpage_view.dart b/wallpaper/lib/pages/tabarpage/tabarpage_view.dart index c4ae1c5..b8cfc73 100644 --- a/wallpaper/lib/pages/tabarpage/tabarpage_view.dart +++ b/wallpaper/lib/pages/tabarpage/tabarpage_view.dart @@ -41,10 +41,10 @@ class TabbarPageView extends GetView { icon: Icon(Icons.collections), label: "收藏" ), - const BottomNavigationBarItem( - icon: Icon(Icons.download), - label: "下载" - ), + // const BottomNavigationBarItem( + // icon: Icon(Icons.download), + // label: "下载" + // ), const BottomNavigationBarItem( icon: Icon(Icons.person), label: "我的" @@ -54,7 +54,7 @@ class TabbarPageView extends GetView { //返回每个tabitem对应控制器视图,必须一一对应 List getPages(){ - return [const HomePageView(),const CollectionPageView(),const DownloadPageView(),const MyPageView(),]; + return [const HomePageView(),const CollectionPageView(),const MyPageView(),]; } diff --git a/wallpaper/pubspec.lock b/wallpaper/pubspec.lock index 0bff9f5..b92901a 100644 --- a/wallpaper/pubspec.lock +++ b/wallpaper/pubspec.lock @@ -301,6 +301,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.6.1" + transparent_image: + dependency: "direct main" + description: + name: transparent_image + sha256: e8991d955a2094e197ca24c645efec2faf4285772a4746126ca12875e54ca02f + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" vector_math: dependency: transitive description: diff --git a/wallpaper/pubspec.yaml b/wallpaper/pubspec.yaml index 7b86122..d5712a2 100644 --- a/wallpaper/pubspec.yaml +++ b/wallpaper/pubspec.yaml @@ -46,7 +46,8 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 - + transparent_image: + dev_dependencies: flutter_test: sdk: flutter