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: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',
),
);
}),
),
),
);
}

View File

@ -41,10 +41,10 @@ class TabbarPageView extends GetView <TabbarPageController>{
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 <TabbarPageController>{
//tabitem对应控制器视图,
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"
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:

View File

@ -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