This commit is contained in:
bluesea 2024-05-11 15:29:54 +08:00
parent 24887bd711
commit 3ceb666de4
4 changed files with 38 additions and 12 deletions

View File

@ -1,17 +1,34 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:transparent_image/transparent_image.dart';
class HomePageView extends GetView { class HomePageView extends GetView {
const HomePageView({super.key}); const HomePageView({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( const title = "壁纸";
appBar: AppBar(
title: const Text("壁纸"), return MaterialApp(
), title: title,
body: const Center( home: Scaffold(
child: Text("xxxxx"), 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',
),
);
}),
),
), ),
); );
} }

View File

@ -41,10 +41,10 @@ class TabbarPageView extends GetView <TabbarPageController>{
icon: Icon(Icons.collections), icon: Icon(Icons.collections),
label: "收藏" label: "收藏"
), ),
const BottomNavigationBarItem( // const BottomNavigationBarItem(
icon: Icon(Icons.download), // icon: Icon(Icons.download),
label: "下载" // label: "下载"
), // ),
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: Icon(Icons.person), icon: Icon(Icons.person),
label: "我的" label: "我的"
@ -54,7 +54,7 @@ class TabbarPageView extends GetView <TabbarPageController>{
//tabitem对应控制器视图, //tabitem对应控制器视图,
List<Widget> getPages(){ List<Widget> getPages(){
return [const HomePageView(),const CollectionPageView(),const DownloadPageView(),const MyPageView(),]; return [const HomePageView(),const CollectionPageView(),const MyPageView(),];
} }

View File

@ -301,6 +301,14 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.6.1" 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: vector_math:
dependency: transitive dependency: transitive
description: description:

View File

@ -46,6 +46,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6 cupertino_icons: ^1.0.6
transparent_image:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: