diff --git a/lib/style/app_style.dart b/lib/style/app_style.dart index 5e81c07..23205b1 100644 --- a/lib/style/app_style.dart +++ b/lib/style/app_style.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + class AppStyle { //颜色,渐变主颜色和次级颜色 static const primaryColor = Color(0xFFFDCF12); @@ -14,4 +16,11 @@ class AppStyle { ///背景色 static const backgroundColor = Color(0xFFF9F9F9); + + ///字体格式 + final barTitleStyle = TextStyle( + color: primaryTextColor, + fontSize: 36.sp, + fontWeight: FontWeight.bold, + ); } diff --git a/lib/ui/home/system_message.dart b/lib/ui/home/system_message.dart new file mode 100644 index 0000000..a2ee2ec --- /dev/null +++ b/lib/ui/home/system_message.dart @@ -0,0 +1,49 @@ +import 'package:aku_community_manager/style/app_style.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +class SystemMessage extends StatefulWidget { + SystemMessage({Key key}) : super(key: key); + + @override + _SystemMessageState createState() => _SystemMessageState(); +} + +class _SystemMessageState extends State { + Widget _messageList(String date){ + Column( + children: [ + Container( + alignment: Alignment.center, + width: double.infinity, + height: 48.w+33.w, + child: Text('date',style: TextStyle(color: AppStyle.minorTextColor,fontSize: 24.sp),), + ), + Container( + padding: EdgeInsets.all(24.w), + color: Color(0xFFFFFFFF), + child: Column( + children: [ + Row( + children:[ Icon(Icons.point_of_sale,size: 16.w,), + SizedBox(width: 16.w,), + Text('系统通知',style: TextStyle(color:AppStyle.primaryTextColor,fontSize:32.sp,fontWeight: FontWeight.w600),), + ] + ), + ], + ), + ), + ], + ); + } + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title:Text('消息',style:AppStyle().barTitleStyle), + ), + body:ListView(children: [ + _messageList('2020-10-23 10:00') + ],) , + ); + } +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index cdf4490..9013723 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -31,6 +31,13 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.0.4" + carousel_slider: + dependency: "direct main" + description: + name: carousel_slider + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.1" characters: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index f84c33f..5db18a1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -35,6 +35,8 @@ dependencies: get: ^3.15.0 #刷新 flutter_easyrefresh: ^2.1.6 + #划动组件 + carousel_slider: ^2.3.1 #qrcode san qr_code_scanner: ^0.0.13 #toast