23 lines
804 B
Dart
23 lines
804 B
Dart
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, required this.page});
|
|
}
|
|
|
|
final List<PageInfo> pages = [
|
|
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();
|