diff --git a/lib/layout/index.dart b/lib/layout/index.dart new file mode 100644 index 0000000..44fd1a4 --- /dev/null +++ b/lib/layout/index.dart @@ -0,0 +1,132 @@ +import 'package:flutter/material.dart'; + +class NavBar extends StatelessWidget { + final int currentIndex; + final Function(int) onTap; + + static const List navItems = [ + BottomNavigationBarItem( + icon: Icon(Icons.home_outlined), + activeIcon: Icon(Icons.home), + label: "记录", + ), + BottomNavigationBarItem( + icon: Icon(Icons.pie_chart_outline), + activeIcon: Icon(Icons.pie_chart), + label: "统计", + ), + BottomNavigationBarItem( + icon: Icon(Icons.group_outlined), + activeIcon: Icon(Icons.group), + label: "朋友圈", + ), + BottomNavigationBarItem( + icon: Icon(Icons.account_circle_outlined), + activeIcon: Icon(Icons.account_circle), + label: "我的", + ), + ]; + + const NavBar({super.key, required this.currentIndex, required this.onTap}); + + @override + Widget build(BuildContext context) { + return BottomNavigationBar( + currentIndex: currentIndex, + iconSize: 25, + type: BottomNavigationBarType.fixed, + backgroundColor: Colors.white, + items: navItems, + onTap: onTap, + ); + } +} + +class SettingsDrawer extends StatelessWidget { + const SettingsDrawer({super.key}); + + @override + Widget build(BuildContext context) { + // final themeProvider = Provider.of(context); + + return Drawer( + child: ListView( + padding: EdgeInsets.zero, + children: [ + ConstrainedBox( + constraints: const BoxConstraints(maxHeight: 100), + child: DrawerHeader( + decoration: BoxDecoration(color: Theme.of(context).primaryColor), + child: const Text( + '设置', + style: TextStyle(color: Colors.white, fontSize: 24), + ), + ), + ), + ListTile( + leading: const Icon(Icons.brightness_4), + title: const Text('夜间模式'), + // trailing: Switch( + // value: themeProvider.isDarkMode, + // onChanged: (bool value) { + // themeProvider.toggleTheme(); + // }, + // ), + // onTap: () => themeProvider.toggleTheme(), + ), + + // 其他设置选项 + ListTile( + leading: const Icon(Icons.notifications), + title: const Text('通知设置'), + onTap: () { + Navigator.pop(context); // 关闭抽屉 + // 跳转到通知设置页面 + }, + ), + + ListTile( + leading: const Icon(Icons.language), + title: const Text('语言'), + onTap: () { + Navigator.pop(context); // 关闭抽屉 + // 跳转到语言设置页面 + }, + ), + + // 底部关于 + const Divider(), + ListTile( + leading: const Icon(Icons.info), + title: const Text('关于我们'), + onTap: () { + Navigator.pop(context); // 关闭抽屉 + // 跳转到关于页面 + }, + ), + ], + ), + ); + } +} + +List homeActions() { + return [ + IconButton( + icon: Icon(Icons.search, color: Colors.white), + onPressed: () { + // 搜索功能 + }, + ), + Builder( + builder: (BuildContext context) { + return IconButton( + icon: Icon(Icons.settings, color: Colors.white), + onPressed: () { + Scaffold.of(context).openEndDrawer(); + }, + ); + }, + ), + ]; +} diff --git a/lib/main.dart b/lib/main.dart index e171f31..d968082 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:food_hub_app/profile.dart'; -import 'package:food_hub_app/record.dart'; +import 'package:food_hub_app/views/home.dart'; import 'package:food_hub_app/views/login.dart'; import 'package:food_hub_app/views/recordForm.dart'; import 'package:form_builder_validators/form_builder_validators.dart'; @@ -19,7 +18,7 @@ class MyApp extends StatelessWidget { Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, - theme: ThemeData(fontFamily: 'CustomFont', primaryColor: Colors.green), + theme: ThemeData(fontFamily: 'CustomFont'), supportedLocales: const [ Locale('en', 'US'), // 英语 Locale('zh', 'CN'), // 中文 @@ -41,89 +40,9 @@ class MyApp extends StatelessWidget { }, home: LoginPage(), routes: { - '/home': (context) => MainPage(), + '/home': (context) => HomePage(), '/recordForm': (context) => RecordFormPage(), }, ); } } - -class MainPage extends StatefulWidget { - const MainPage({super.key}); - - @override - State createState() => _MainPage(); -} - -class _MainPage extends State { - int _currentIndex = 0; - - final List _tabPages = const [RecordPage(), ProfilePage()]; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - centerTitle: true, - title: Text('Food Hub'), - backgroundColor: Colors.green, - leading: IconButton( - icon: Icon(Icons.menu), - onPressed: () { - // 打开侧边栏或菜单 - }, - ), - actions: [ - IconButton( - icon: Icon(Icons.search), - onPressed: () { - // 搜索功能 - }, - ), - IconButton( - icon: Icon(Icons.more_vert), - onPressed: () { - // 更多选项 - }, - ), - ], - ), - backgroundColor: Color(0xFFF5F5F5), - body: _tabPages[_currentIndex], - floatingActionButton: - _currentIndex == _tabPages.length - 1 ? null : addItemButton(context), - bottomNavigationBar: BottomNavigationBar( - currentIndex: _currentIndex, - iconSize: 25, - type: BottomNavigationBarType.fixed, - backgroundColor: Colors.white, - items: const [ - BottomNavigationBarItem(icon: Icon(Icons.home), label: "记录"), - BottomNavigationBarItem( - icon: Icon(Icons.account_circle), - label: "我的", - ), - ], - onTap: (index) { - setState(() { - _currentIndex = index; - }); - }, - ), - ); - } -} - -Widget addItemButton(BuildContext context) { - void onAddItemClick(BuildContext context) { - Navigator.pushNamed(context, '/recordForm'); - } - - return FloatingActionButton( - mini: true, - onPressed: () => onAddItemClick(context), - backgroundColor: Colors.green, - shape: const CircleBorder(), - child: Icon(Icons.add, color: Colors.white), - ); -} diff --git a/lib/models/recipe.dart b/lib/models/recipe.dart index 235cbc0..eb700b5 100644 --- a/lib/models/recipe.dart +++ b/lib/models/recipe.dart @@ -8,14 +8,23 @@ class Recipe { final int commentCount; Recipe( - this.name, - this.category, - this.date, - this.imageUrl, - this.likeCount, - this.favoriteCount, - this.commentCount, - ); + this.name, + this.category, + this.date, + this.imageUrl, + this.likeCount, + this.favoriteCount, + this.commentCount, + ); +} + +class Record { + final String name; + final String category; + final String date; + final String imageUrl; + + Record(this.name, this.category, this.date, this.imageUrl); } enum ViewType { recipe, calendar, timeline } diff --git a/lib/utils/index.dart b/lib/utils/index.dart new file mode 100644 index 0000000..534392d --- /dev/null +++ b/lib/utils/index.dart @@ -0,0 +1,17 @@ +import 'package:intl/intl.dart'; + +/// 解析日期选择器 +String parseDatePickerSelected(Map selected) { + final String year = selected['year'].toString().padLeft(4, '0'); + final String month = selected['month'].toString().padLeft(2, '0'); + final String day = selected['day'].toString().padLeft(2, '0'); + + return '$year-$month-$day'; +} + +/// 格式化时间 +String formatDateTime(DateTime dateTime, [String format = 'yyyy-MM-dd']) { + final DateFormat formatter = DateFormat(format); + // return formatter.format(dateTime); + return Intl.withLocale('zh_CN', () => formatter.format(dateTime)); +} \ No newline at end of file diff --git a/lib/views/home.dart b/lib/views/home.dart new file mode 100644 index 0000000..5ef27a1 --- /dev/null +++ b/lib/views/home.dart @@ -0,0 +1,73 @@ +import 'package:flutter/material.dart'; +import 'package:food_hub_app/layout/index.dart'; +import 'package:food_hub_app/views/moment.dart'; +import 'package:food_hub_app/views/profile.dart'; +import 'package:food_hub_app/views/record.dart'; +import 'package:food_hub_app/views/stats.dart'; + +class HomePage extends StatefulWidget { + const HomePage({super.key}); + + @override + State createState() => _HomePage(); +} + +class _HomePage extends State { + int _currentIndex = 0; + + final List _tabPages = const [ + RecordPage(), + StatsPage(), + MomentPage(), + ProfilePage(), + ]; + + bool isShow(int index) { + return index == 0 || index == 2; + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + centerTitle: true, + title: Text('Food Hub', style: TextStyle(color: Colors.white)), + backgroundColor: Theme.of(context).primaryColor, + leading: IconButton( + icon: Icon(Icons.menu, color: Colors.white), + onPressed: () { + // 打开侧边栏或菜单 + }, + ), + actions: homeActions(), + ), + backgroundColor: Color(0xFFF5F5F5), + endDrawer: const SettingsDrawer(), + body: _tabPages[_currentIndex], + floatingActionButton: + isShow(_currentIndex) ? addItemButton(context) : null, + bottomNavigationBar: NavBar( + currentIndex: _currentIndex, + onTap: (index) { + setState(() { + _currentIndex = index; + }); + }, + ), + ); + } +} + +Widget addItemButton(BuildContext context) { + void onAddItemClick(BuildContext context) { + Navigator.pushNamed(context, '/recordForm'); + } + + return FloatingActionButton( + mini: true, + onPressed: () => onAddItemClick(context), + backgroundColor: Theme.of(context).primaryColor, + shape: const CircleBorder(), + child: Icon(Icons.add, color: Colors.white), + ); +} diff --git a/lib/views/login.dart b/lib/views/login.dart index 204371c..f7fe5c6 100644 --- a/lib/views/login.dart +++ b/lib/views/login.dart @@ -24,12 +24,30 @@ class _LoginPage extends State { ]; void loginClick(BuildContext context) { + Navigator.pushNamed(context, '/home'); + return; + // 表单校验通过才会继续执行 if ((_formKey.currentState as FormState).validate()) { (_formKey.currentState as FormState).save(); + TDMessage.showMessage( + context: context, + visible: true, + icon: true, + content: "登录成功", + theme: MessageTheme.success, + duration: 3000, + ); Navigator.pushNamed(context, '/home'); } else { - // showErrorToast("请先输入信息"); + TDMessage.showMessage( + context: context, + visible: true, + icon: true, + content: "请先输入信息", + theme: MessageTheme.error, + duration: 3000, + ); } } diff --git a/lib/views/moment.dart b/lib/views/moment.dart new file mode 100644 index 0000000..4d3086c --- /dev/null +++ b/lib/views/moment.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; + +class MomentPage extends StatefulWidget { + const MomentPage({super.key}); + + @override + State createState() => _MomentPage(); +} + +class _MomentPage extends State{ + @override + Widget build(BuildContext context) { + return const Center(child: Text("朋友圈")); + } +} diff --git a/lib/profile.dart b/lib/views/profile.dart similarity index 100% rename from lib/profile.dart rename to lib/views/profile.dart diff --git a/lib/record.dart b/lib/views/record.dart similarity index 86% rename from lib/record.dart rename to lib/views/record.dart index 07cf0de..d6449e7 100644 --- a/lib/record.dart +++ b/lib/views/record.dart @@ -4,7 +4,7 @@ import 'package:food_hub_app/widgets/recipe/recipe_list.dart'; import 'package:food_hub_app/widgets/recipe/recipe_timeline.dart'; import 'package:tdesign_flutter/tdesign_flutter.dart'; -import 'models/recipe.dart'; +import '../models/recipe.dart'; class RecordPage extends StatefulWidget { const RecordPage({super.key}); @@ -20,6 +20,11 @@ class _RecordPageState extends State Recipe("红烧肉", "家常菜", "2025-05-05", "https://picsum.photos/200", 12, 4, 7), ]; + final List recordList = [ + Record("韭菜炒鸡蛋", "家常菜", "2025-05-04", "https://picsum.photos/200"), + Record("红烧肉", "家常菜", "2025-05-05", "https://picsum.photos/200"), + ]; + late final TabController _tabController = TabController( length: 3, vsync: this, @@ -39,7 +44,7 @@ class _RecordPageState extends State // 定义标签列表 final List tabs = [ const TDTab(text: '菜谱', icon: Icon(Icons.book)), - const TDTab(text: '日历', icon: Icon(Icons.calendar_today)), + const TDTab(text: '日历', icon: Icon(Icons.calendar_month)), const TDTab(text: '时间轴', icon: Icon(Icons.timeline)), ]; @@ -49,7 +54,6 @@ class _RecordPageState extends State padding: EdgeInsets.all(0), child: Column( children: [ - // 标签栏 TDTabBar( tabs: tabs, controller: _tabController, diff --git a/lib/views/recordForm.dart b/lib/views/recordForm.dart index 82cf2d0..ecc6149 100644 --- a/lib/views/recordForm.dart +++ b/lib/views/recordForm.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_form_builder/flutter_form_builder.dart'; +import 'package:food_hub_app/utils/index.dart'; import 'package:food_hub_app/widgets/common/index.dart'; import 'package:image_picker/image_picker.dart'; import 'package:tdesign_flutter/tdesign_flutter.dart'; @@ -28,29 +29,7 @@ class _RecordFormPage extends State { XFile? _selectedImage; /// 整个表单存放的数据 - Map _formData = { - "name": '', - "date": '', - "gender": '', - "birth": '', - "place": '', - "age": "2", - "description": "2", - "resume": '', - "photo": '', - }; - - Map _formItemNotifier = { - "name": '', - "password": '', - "gender": '', - "birth": '', - "place": '', - "age": '2', - "description": '', - "resume": '', - "photo": "", - }; + Map _formData = {"name": '', "date": '', "photo": ''}; /// 定义整个校验规则 final Map _validationRules = { @@ -71,14 +50,6 @@ class _RecordFormPage extends State { ), }; - void confirmClick(BuildContext context) { - if (_formKey.currentState?.saveAndValidate() ?? false) { - // showSuccessToast("新增记录成功"); - } else { - // showErrorToast("请先提交信息"); - } - } - List files = []; List _onValueChanged( @@ -108,28 +79,28 @@ class _RecordFormPage extends State { @override void initState() { - /// 三个文本型的表格单元 - for (var i = 0; i < 4; i++) { - _controller.add(TextEditingController()); - } - _formData.forEach((key, value) { - _formItemNotifier[key] = FormItemNotifier(); - }); super.initState(); } @override void dispose() { - // TODO: implement dispose super.dispose(); } - String parseDatePickerSelected(Map selected) { - final String year = selected['year'].toString().padLeft(4, '0'); - final String month = selected['month'].toString().padLeft(2, '0'); - final String day = selected['day'].toString().padLeft(2, '0'); - - return '$year-$month-$day'; + void _confirmClick(BuildContext context) { + if (_formKey.currentState?.saveAndValidate() ?? false) { + // showSuccessToast("新增记录成功"); + print(_formData); + } else { + TDMessage.showMessage( + context: context, + visible: true, + icon: true, + content: "请先输入信息", + theme: MessageTheme.error, + duration: 3000, + ); + } } TDFormItem buildNameItem() { @@ -150,8 +121,8 @@ class _RecordFormPage extends State { backgroundColor: Colors.white, additionInfoColor: TDTheme.of(context).errorColor6, showBottomDivider: false, - onChanged: (val) { - _formData['name'] = val; + onChanged: (value) { + _formData['name'] = value; }, ), ); @@ -168,21 +139,19 @@ class _RecordFormPage extends State { hintText: '请选择完成时间', select: _formData['date'], selectFn: (BuildContext context) { + DateTime now = DateTime.now(); TDPicker.showDatePicker( context, title: '选择时间', onConfirm: (selected) { setState(() { - print(selected); - _selected_1 = - '${selected['year'].toString().padLeft(4, '0')}-${selected['month'].toString().padLeft(2, '0')}-${selected['day'].toString().padLeft(2, '0')}'; - _formItemNotifier['birth']?.upDataForm(_selected_1); + _formData['date'] = parseDatePickerSelected(selected); }); Navigator.of(context).pop(); }, - dateStart: [1999, 01, 01], - dateEnd: [2050, 12, 31], - initialDate: [2012, 1, 1], + dateStart: [2000, 01, 01], + dateEnd: [2100, 12, 31], + initialDate: [now.year, now.month, now.day], ); }, ); @@ -194,7 +163,6 @@ class _RecordFormPage extends State { name: 'photo', labelWidth: 82.0, type: TDFormItemType.upLoadImg, - formItemNotifier: _formItemNotifier['photo'], child: TDUpload( files: files, onError: print, @@ -202,9 +170,7 @@ class _RecordFormPage extends State { onChange: ((imgList, type) { files = _onValueChanged(files ?? [], imgList, type); List imgs = files.map((e) => e.remotePath ?? e.assetPath).toList(); - setState(() { - _formItemNotifier['photo'].upDataForm(imgs.join(',')); - }); + setState(() {}); }), ), ); @@ -214,21 +180,16 @@ class _RecordFormPage extends State { return Container( decoration: BoxDecoration(color: TDTheme.of(context).whiteColor1), child: Padding( - padding: const EdgeInsets.all(16), + padding: const EdgeInsets.all(10), child: Row( children: [ Expanded( child: TDButton( - text: '重置', + text: '取消', type: TDButtonType.fill, theme: TDButtonTheme.light, shape: TDButtonShape.rectangle, - onTap: () { - //用户名称 - _controller[0].clear(); - //密码 - _controller[1].clear(); - }, + onTap: () => Navigator.pop(context), ), ), SizedBox(width: 20), @@ -238,7 +199,7 @@ class _RecordFormPage extends State { type: TDButtonType.fill, theme: TDButtonTheme.primary, shape: TDButtonShape.rectangle, - onTap: () => {}, + onTap: () => _confirmClick(context), ), ), ], @@ -250,7 +211,14 @@ class _RecordFormPage extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text('新增记录'), backgroundColor: Colors.white), + appBar: AppBar( + title: Text('新增记录', style: TextStyle(color: Colors.white)), + backgroundColor: Theme.of(context).primaryColor, + leading: IconButton( + icon: Icon(Icons.arrow_back, color: Colors.white), + onPressed: () => Navigator.pop(context) + ), + ), backgroundColor: Color(0xFFF5F5F5), body: Padding( padding: const EdgeInsets.all(10), diff --git a/lib/views/stats.dart b/lib/views/stats.dart new file mode 100644 index 0000000..5975d33 --- /dev/null +++ b/lib/views/stats.dart @@ -0,0 +1,35 @@ +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; + +class StatsPage extends StatefulWidget { + const StatsPage({super.key}); + + @override + State createState() => _StatsPage(); +} + +class _StatsPage extends State{ + @override + Widget build(BuildContext context) { + // 月度做菜次数数据 + final List spots = [ + FlSpot(0, 13), FlSpot(1, 32), FlSpot(2, 121), + FlSpot(3, 31), FlSpot(4, 34), FlSpot(5, 45) + ]; + + // 月份标签 + final List months = [ + '1月', '2月', '3月', '4月', '5月', '6月' + ]; + + return LineChart( + LineChartData( + lineBarsData: [ + LineChartBarData( + spots: spots, + ), + ], + ), + ); + } +} diff --git a/lib/widgets/recipe/recipe_calendar.dart b/lib/widgets/recipe/recipe_calendar.dart index 788dfa6..a9ede94 100644 --- a/lib/widgets/recipe/recipe_calendar.dart +++ b/lib/widgets/recipe/recipe_calendar.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:food_hub_app/utils/index.dart'; import 'package:table_calendar/table_calendar.dart'; +import 'package:tdesign_flutter/tdesign_flutter.dart'; class RecipeCalendar extends StatefulWidget { const RecipeCalendar({super.key}); @@ -9,50 +11,104 @@ class RecipeCalendar extends StatefulWidget { } class _RecipeCalendarState extends State { - // 当前选中的日期 DateTime _selectedDay = DateTime.now(); - // 当前显示的月份 DateTime _focusedDay = DateTime.now(); + + + TableCalendar recipeCalendar() { + return TableCalendar( + locale: 'zh_CN', + headerStyle: const HeaderStyle( + formatButtonVisible: false, + titleCentered: true, + ), + firstDay: DateTime.utc(2010, 1, 1), + lastDay: DateTime.utc(2100, 12, 31), + focusedDay: _focusedDay, + selectedDayPredicate: (day) => isSameDay(_selectedDay, day), + onDaySelected: (selectedDay, focusedDay) { + if (!isSameDay(_selectedDay, selectedDay)) { + setState(() { + _selectedDay = selectedDay; + _focusedDay = focusedDay; + }); + } + }, + onPageChanged: (focusedDay) { + print("cxx"); + _focusedDay = focusedDay; + }, + ); + } + + Widget dailyItem() { + return Card( + elevation: 0, + color: Colors.white, + child: Padding( + padding: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(formatDateTime(_selectedDay, 'MM月dd日 EEEE')), + recipeRecordItem(), + ], + ), + ), + ); + } + + Widget recipeRecordItem() { + return Card( + elevation: 0, + color: Colors.limeAccent.shade100, + child: Padding( + padding: EdgeInsets.all(10), + child: Row( + children: [ + TDAvatar( + size: TDAvatarSize.medium, + type: TDAvatarType.customText, + text: 'A', + ), + SizedBox(width: 10), + Expanded( + // 使用Expanded让文本区域占据剩余空间 + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "青椒土豆丝", + style: TextStyle(fontWeight: FontWeight.bold), + ), + SizedBox(height: 5), + Text("家常菜", style: TextStyle(color: Colors.grey)), + ], + ), + ), + SizedBox(width: 10), + TDButton( + icon: TDIcons.arrow_right, + type: TDButtonType.fill, + shape: TDButtonShape.circle, + theme: TDButtonTheme.primary, + ), + ], + ), + ), + ); + } + @override Widget build(BuildContext context) { return Column( children: [ - Card( - elevation: 0, - color: Colors.white, - child: TableCalendar( - locale: 'zh_CN', - headerStyle: const HeaderStyle( - formatButtonVisible: false, - titleCentered: true, - ), - firstDay: DateTime.utc(2010, 1, 1), - lastDay: DateTime.utc(2100, 12, 31), - focusedDay: _focusedDay, - selectedDayPredicate: (day) => isSameDay(_selectedDay, day), - onDaySelected: (selectedDay, focusedDay) { - if (!isSameDay(_selectedDay, selectedDay)) { - setState(() { - _selectedDay = selectedDay; - _focusedDay = focusedDay; - }); - } - }, - onPageChanged: (focusedDay) { - print("cxx"); - _focusedDay = focusedDay; - }, - ), - ), - - // 显示选中的日期 - const SizedBox(height: 16), - Text( - '选中的日期: ${_selectedDay.year}-${_selectedDay.month}-${_selectedDay.day}', - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), - ), + Card(elevation: 0, color: Colors.white, child: recipeCalendar()), + const SizedBox(height: 10), + dailyItem(), ], ); } -} \ No newline at end of file +} diff --git a/pubspec.lock b/pubspec.lock index f1d5675..aa4f665 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -65,6 +65,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.4.0" + equatable: + dependency: transitive + description: + name: equatable + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.7" fake_async: dependency: transitive description: @@ -105,27 +113,19 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.9.3+4" + fl_chart: + dependency: "direct main" + description: + name: fl_chart + sha256: "577aeac8ca414c25333334d7c4bb246775234c0e44b38b10a82b559dd4d764e7" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" - flutter_date_pickers: - dependency: "direct main" - description: - name: flutter_date_pickers - sha256: "302b1200d8859ec0bfe51c4eaea5f4911d1dbfc3c3f7d256dcf32d99fec219ee" - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.4.3" - flutter_datetime_picker_plus: - dependency: "direct main" - description: - name: flutter_datetime_picker_plus - sha256: "7d82da02c4e070bb28a9107de119ad195e2319b45c786fecc13482a9ffcc51da" - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.2.0" flutter_form_builder: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 4762091..b9a26d6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1 +1 @@ -name: food_hub_app description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 # followed by an optional build number separated by a +. # Both the version and the builder number may be overridden in flutter # build by specifying --build-name and --build-number, respectively. # In Android, build-name is used as versionName while build-number used as versionCode. # Read more about Android versioning at https://developer.android.com/studio/publish/versioning # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. version: 1.0.0+1 environment: sdk: ^3.7.0 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions # consider running `flutter pub upgrade --major-versions`. Alternatively, # dependencies can be manually updated by changing the version numbers below to # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter # The following adds the Cupertino Icons fonts to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 timelines_plus: ^1.0.7 table_calendar: ^3.1.3 flutter_datetime_picker_plus: ^2.2.0 flutter_date_pickers: ^0.4.3 flutter_form_builder: ^10.0.0 form_builder_validators: ^11.1.2 # fluttertoast: ^8.2.2 intl: ^0.19.0 tdesign_flutter: ^0.2.3 dependency_overrides: tdesign_flutter_adaptation: 3.16.0 image_picker: 1.0.8 dev_dependencies: flutter_test: sdk: flutter # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter packages. flutter: # The following line ensures that the Material Icons fonts is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images # For details regarding adding assets from package dependencies, see # https://flutter.dev/to/asset-from-package # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the fonts family name, and a "fonts" key with a # list giving the asset and other descriptors for the fonts. For # example: # fonts: # - family: Schyler # fonts: # - asset: fonts/Schyler-Regular.ttf # - asset: fonts/Schyler-Italic.ttf # style: italic # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf # - asset: fonts/TrajanPro_Bold.ttf # weight: 700 # # For details regarding fonts from package dependencies, # see https://flutter.dev/to/font-from-package fonts: - family: CustomFont fonts: - asset: fonts/custom.ttf \ No newline at end of file +name: food_hub_app description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 # followed by an optional build number separated by a +. # Both the version and the builder number may be overridden in flutter # build by specifying --build-name and --build-number, respectively. # In Android, build-name is used as versionName while build-number used as versionCode. # Read more about Android versioning at https://developer.android.com/studio/publish/versioning # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. version: 1.0.0+1 environment: sdk: ^3.7.0 # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions # consider running `flutter pub upgrade --major-versions`. Alternatively, # dependencies can be manually updated by changing the version numbers below to # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter # The following adds the Cupertino Icons fonts to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 timelines_plus: ^1.0.7 table_calendar: ^3.1.3 flutter_form_builder: ^10.0.0 form_builder_validators: ^11.1.2 fl_chart: ^1.0.0 intl: ^0.19.0 tdesign_flutter: ^0.2.3 dependency_overrides: tdesign_flutter_adaptation: 3.16.0 image_picker: 1.0.8 dev_dependencies: flutter_test: sdk: flutter # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter packages. flutter: # The following line ensures that the Material Icons fonts is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images # For details regarding adding assets from package dependencies, see # https://flutter.dev/to/asset-from-package # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the fonts family name, and a "fonts" key with a # list giving the asset and other descriptors for the fonts. For # example: # fonts: # - family: Schyler # fonts: # - asset: fonts/Schyler-Regular.ttf # - asset: fonts/Schyler-Italic.ttf # style: italic # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf # - asset: fonts/TrajanPro_Bold.ttf # weight: 700 # # For details regarding fonts from package dependencies, # see https://flutter.dev/to/font-from-package fonts: - family: CustomFont fonts: - asset: fonts/custom.ttf \ No newline at end of file