ui
This commit is contained in:
parent
b660bc4331
commit
24887bd711
12208
wallpaper/assets/wallpaper.json
Normal file
12208
wallpaper/assets/wallpaper.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ class HomePageView extends GetView {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("首页"),
|
||||
title: const Text("壁纸"),
|
||||
),
|
||||
body: const Center(
|
||||
child: Text("xxxxx"),
|
||||
|
||||
@ -6,12 +6,29 @@ class MyPageView extends GetView {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("我的"),
|
||||
),
|
||||
body: const Center(
|
||||
child: Text("我的..."),
|
||||
const title = '我的';
|
||||
return MaterialApp(
|
||||
title: title,
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text(title),
|
||||
),
|
||||
body: ListView(
|
||||
children: const <Widget>[
|
||||
ListTile(
|
||||
leading: Icon(Icons.web),
|
||||
title: Text('隐私协议'),
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.web),
|
||||
title: Text('用户协议'),
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.info),
|
||||
title: Text('系统版本 v1.0'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -38,12 +38,16 @@ class TabbarPageView extends GetView <TabbarPageController>{
|
||||
label: "Home"
|
||||
),
|
||||
const BottomNavigationBarItem(
|
||||
icon: Icon(Icons.book),
|
||||
label: "Collection"
|
||||
icon: Icon(Icons.collections),
|
||||
label: "收藏"
|
||||
),
|
||||
const BottomNavigationBarItem(
|
||||
icon: Icon(Icons.music_video),
|
||||
label: "My"
|
||||
icon: Icon(Icons.download),
|
||||
label: "下载"
|
||||
),
|
||||
const BottomNavigationBarItem(
|
||||
icon: Icon(Icons.person),
|
||||
label: "我的"
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
11
wallpaper/lib/utils/assettool.dart
Normal file
11
wallpaper/lib/utils/assettool.dart
Normal file
@ -0,0 +1,11 @@
|
||||
import 'package:flutter/services.dart' show rootBundle;
|
||||
import 'dart:convert';
|
||||
Future<Map<String, dynamic>> loadWallpaperJsonFromAsset() async {
|
||||
String jsonStr = await rootBundle.loadString('assets/wallpaper.json');
|
||||
return jsonDecode(jsonStr);
|
||||
}
|
||||
|
||||
|
||||
// Map<String, dynamic> jsonData = await loadWallpaperJsonFromAsset();
|
||||
// String name = jsonData['name'];
|
||||
// int age = jsonData['age'];
|
||||
@ -42,7 +42,7 @@ dependencies:
|
||||
|
||||
# 加载、进度、提示框
|
||||
flutter_easyloading: ^3.0.5
|
||||
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.6
|
||||
@ -70,7 +70,8 @@ flutter:
|
||||
uses-material-design: true
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
# assets:
|
||||
assets:
|
||||
- assets/wallpaper.json
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user