feat:增加博客统计模块
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
import 'package:blog_app/pages/blog_page.dart';
|
||||
import 'package:blog_app/pages/category_page.dart';
|
||||
import 'package:blog_app/pages/stats_page.dart';
|
||||
import 'package:blog_app/pages/timeline_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PageInfo {
|
||||
final String title;
|
||||
final IconData icon;
|
||||
final Widget page;
|
||||
|
||||
const PageInfo({required this.title, required this.icon});
|
||||
const PageInfo({required this.title, required this.icon, required this.page});
|
||||
}
|
||||
|
||||
final List<PageInfo> pages = [
|
||||
PageInfo(title: '博客', icon: Icons.article),
|
||||
PageInfo(title: '分类', icon: Icons.folder),
|
||||
PageInfo(title: '个人中心', icon: Icons.person),
|
||||
PageInfo(title: '设置', icon: Icons.settings),
|
||||
PageInfo(title: '关于我们', icon: Icons.info),
|
||||
PageInfo(title: '博客', icon: Icons.article, page: BlogPage()),
|
||||
PageInfo(title: '分类', icon: Icons.folder, page: CategoryPage()),
|
||||
PageInfo(title: '归档', icon: Icons.archive, page: TimelinePage()),
|
||||
PageInfo(title: '统计', icon: Icons.insert_chart, page: StatsPage()),
|
||||
];
|
||||
|
||||
final List<Widget> pageWidgets = pages.map((item) => item.page).toList();
|
||||
|
||||
Reference in New Issue
Block a user