ui
This commit is contained in:
parent
24887bd711
commit
3ceb666de4
@ -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',
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -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(),];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user