소스 검색

添加个人中心,钱包页面

tags/0.0.1
Weller 4 년 전
부모
커밋
6154f10eb0
82개의 변경된 파일1311개의 추가작업 그리고 150개의 파일을 삭제
  1. +1
    -1
      .dart_tool/package_config.json
  2. +0
    -8
      lib/pages/main_page/main_page.dart
  3. +108
    -2
      lib/pages/mine_page/mine_page.dart
  4. +121
    -0
      lib/pages/wallet_page/wallet_page.dart
  5. +29
    -0
      lib/pages/wallet_page/wallet_page_bloc.dart
  6. +26
    -0
      lib/pages/withdraw_page/bloc/withdraw_bloc.dart
  7. +1
    -0
      lib/pages/withdraw_page/withdraw_model.dart
  8. +72
    -0
      lib/pages/withdraw_page/withdraw_page.dart
  9. +26
    -8
      lib/register.dart
  10. +0
    -0
      lib/widgets/home/home_banner/bloc/bloc.dart
  11. +6
    -3
      lib/widgets/home/home_banner/bloc/home_banner_bloc.dart
  12. +0
    -0
      lib/widgets/home/home_banner/bloc/home_banner_event.dart
  13. +8
    -4
      lib/widgets/home/home_banner/bloc/home_banner_repository.dart
  14. +0
    -0
      lib/widgets/home/home_banner/bloc/home_banner_state.dart
  15. +3
    -5
      lib/widgets/home/home_banner/home_banner_creater.dart
  16. +0
    -0
      lib/widgets/home/home_banner/home_banner_sk.dart
  17. +15
    -13
      lib/widgets/home/home_banner/home_banner_widget.dart
  18. +0
    -0
      lib/widgets/home/home_banner/model/HomeBannerModel.dart
  19. +2
    -6
      lib/widgets/home/home_goods/bloc/home_goods_bloc.dart
  20. +21
    -14
      lib/widgets/home/home_goods/bloc/home_goods_header_bloc.dart
  21. +5
    -6
      lib/widgets/home/home_goods/home_goods.dart
  22. +3
    -3
      lib/widgets/home/home_goods/home_goods_creater.dart
  23. +4
    -4
      lib/widgets/home/home_goods/home_goods_header.dart
  24. +8
    -8
      lib/widgets/home/home_goods/home_goods_item.dart
  25. +0
    -0
      lib/widgets/home/home_goods/models/home_goods_header_model.dart
  26. +0
    -0
      lib/widgets/home/home_goods/models/home_goods_header_model.g.dart
  27. +0
    -0
      lib/widgets/home/home_goods/models/home_goods_model.dart
  28. +0
    -0
      lib/widgets/home/home_goods/models/home_goods_model.g.dart
  29. +0
    -0
      lib/widgets/home/home_goods/models/home_goods_style_model.dart
  30. +0
    -0
      lib/widgets/home/home_goods/models/home_goods_style_model.g.dart
  31. +0
    -0
      lib/widgets/home/home_goods/skeleton/home_goods_header_sk.dart
  32. +0
    -0
      lib/widgets/home/home_goods/skeleton/home_goods_item_sk.dart
  33. +1
    -1
      lib/widgets/home/home_goods/skeleton/home_goods_sk.dart
  34. +100
    -0
      lib/widgets/home/home_goods_tab/home_goods_tab.dart
  35. +21
    -0
      lib/widgets/home/home_goods_tab/home_goods_tab_creater.dart
  36. +0
    -0
      lib/widgets/home/home_quick_entry/bloc/bloc.dart
  37. +10
    -5
      lib/widgets/home/home_quick_entry/bloc/home_quick_entry_bloc.dart
  38. +0
    -0
      lib/widgets/home/home_quick_entry/bloc/home_quick_entry_event.dart
  39. +0
    -0
      lib/widgets/home/home_quick_entry/bloc/home_quick_entry_repository.dart
  40. +0
    -0
      lib/widgets/home/home_quick_entry/bloc/home_quick_entry_state.dart
  41. +0
    -0
      lib/widgets/home/home_quick_entry/cached_network_image_util.dart
  42. +0
    -0
      lib/widgets/home/home_quick_entry/home_quick_entry_creater.dart
  43. +0
    -0
      lib/widgets/home/home_quick_entry/home_quick_entry_sk.dart
  44. +0
    -0
      lib/widgets/home/home_quick_entry/home_quick_entry_widget.dart
  45. +0
    -0
      lib/widgets/home/home_quick_entry/model/home_quick_entry_model.dart
  46. +0
    -0
      lib/widgets/home/home_slide_banner/bloc/bloc.dart
  47. +15
    -9
      lib/widgets/home/home_slide_banner/bloc/home_slide_banner_bloc.dart
  48. +0
    -0
      lib/widgets/home/home_slide_banner/bloc/home_slide_banner_event.dart
  49. +37
    -0
      lib/widgets/home/home_slide_banner/bloc/home_slide_banner_repository.dart
  50. +3
    -2
      lib/widgets/home/home_slide_banner/bloc/home_slide_banner_state.dart
  51. +0
    -0
      lib/widgets/home/home_slide_banner/home_slide_banner.dart
  52. +0
    -0
      lib/widgets/home/home_slide_banner/home_slide_banner_creater.dart
  53. +0
    -0
      lib/widgets/home/home_slide_banner/home_slide_banner_sk.dart
  54. +0
    -0
      lib/widgets/home/home_slide_banner/model/home_slide_banner_model.dart
  55. +0
    -34
      lib/widgets/home_slide_banner/bloc/home_slide_banner_repository.dart
  56. +14
    -0
      lib/widgets/mine/mine_data/mine_data.dart
  57. +12
    -0
      lib/widgets/mine/mine_data/mine_data_creater.dart
  58. +122
    -0
      lib/widgets/mine/mine_data/mine_data_sk.dart
  59. +14
    -0
      lib/widgets/mine/mine_header/mine_header.dart
  60. +12
    -0
      lib/widgets/mine/mine_header/mine_header_creater.dart
  61. +45
    -0
      lib/widgets/mine/mine_header/mine_header_sk.dart
  62. +5
    -5
      lib/widgets/mine/mine_nav/mine_nav.dart
  63. +3
    -3
      lib/widgets/mine/mine_nav/mine_nav_creater.dart
  64. +0
    -0
      lib/widgets/mine/mine_nav/mine_nav_sk.dart
  65. +1
    -1
      lib/widgets/mine/mine_quick_entry/bloc/mine_quick_entry_bloc.dart
  66. +3
    -3
      lib/widgets/mine/mine_quick_entry/mine_quick_entry.dart
  67. +1
    -1
      lib/widgets/mine/mine_quick_entry/mine_quick_entry_creater.dart
  68. +6
    -0
      lib/widgets/mine/mine_quick_entry/mine_quick_entry_sk.dart
  69. +0
    -0
      lib/widgets/mine/mine_quick_entry/models/mine_quick_entry_model.dart
  70. +0
    -0
     
  71. +0
    -0
     
  72. +0
    -0
     
  73. +1
    -1
      lib/widgets/others/mine_header_bg_widget.dart
  74. +104
    -0
      lib/widgets/others/normal_nav/normal_nav.dart
  75. +21
    -0
      lib/widgets/others/normal_nav/normal_nav_creater.dart
  76. +13
    -0
      lib/widgets/wallet/wallet_data/wallet_data.dart
  77. +12
    -0
      lib/widgets/wallet/wallet_data/wallet_data_creater.dart
  78. +111
    -0
      lib/widgets/wallet/wallet_data/wallet_data_sk.dart
  79. +18
    -0
      lib/widgets/wallet/wallet_detail/wallet_detail.dart
  80. +34
    -0
      lib/widgets/wallet/wallet_detail/wallet_detail_sk.dart
  81. +9
    -0
      lib/widgets/wallet/wallet_income/wallet_income.dart
  82. +104
    -0
      lib/widgets/wallet/wallet_income/wallet_income_sk.dart

+ 1
- 1
.dart_tool/package_config.json 파일 보기

@@ -680,7 +680,7 @@
"languageVersion": "2.1"
}
],
"generated": "2020-09-08T07:00:40.458603Z",
"generated": "2020-09-10T07:09:00.863118Z",
"generator": "pub",
"generatorVersion": "2.7.2"
}

+ 0
- 8
lib/pages/main_page/main_page.dart 파일 보기

@@ -26,13 +26,6 @@ class _MainPageState extends State<MainPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xfff9f9f9),
// body: ChangeNotifierProvider(
// create: (context) => MainPageNotifier(),
// child: BlocProvider<MainPageBloc>(
// bloc: MainPageBloc(),
// child: _MainPageContainer(widget.data),
// ),
// ),
body: MultiProvider(
providers: [
ChangeNotifierProvider.value(value: MainPageNotifier()),
@@ -141,7 +134,6 @@ class _MainPageContainerState extends State<_MainPageContainer> {

list.addAll(WidgetFactory.create(
item.modName,
type: WidgetType.skeleton,
isSliver: true,
model: data,
));


+ 108
- 2
lib/pages/mine_page/mine_page.dart 파일 보기

@@ -1,14 +1,120 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/pages/main_page/main_page.dart';

class MinePage extends StatefulWidget {
@override
_MinePageState createState() => _MinePageState();
}

class _MinePageState extends State<MinePage> {
class _MinePageState extends State<MinePage> with TickerProviderStateMixin {
TabController _tabController;
Map<String, dynamic> _datas = Map();

@override
void initState() {
_tabController = TabController(length: 3, vsync: this);
// 模拟数据
List<Map<String, dynamic>> list = List();
list.add(
Map<String, dynamic>.from({'mod_name': 'index_search', 'mod_id': 5}));
list.add(
Map<String, dynamic>.from({'mod_name': 'index_carousel', 'mod_id': 6}));
list.add(Map<String, dynamic>.from({'mod_name': 'multi_nav', 'mod_id': 7}));
list.add(Map<String, dynamic>.from(
{'mod_name': 'index_banner_one', 'mod_id': 8}));
list.add(Map<String, dynamic>.from(
{'mod_name': 'index_banner_two', 'mod_id': 9}));
list.add(Map<String, dynamic>.from(
{'mod_name': 'index_recommend_list', 'mod_id': 10}));
_datas['components'] = list;
super.initState();
}

@override
void dispose() {
_tabController.dispose();
super.dispose();
}

@override
Widget build(BuildContext context) {
return Container();
List<Widget> _silverBuilder(BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(),
SliverPersistentHeader(
pinned: true,
delegate: _SilverAppBarDelegate(
Container(
color: Colors.amber,
child: TabBar(
labelColor: Colors.blue,
unselectedLabelColor: Colors.black,
controller: _tabController,
tabs: <Widget>[
new Tab(
text: "tab10",
),
new Tab(
text: "tab2",
),
new Tab(
text: "tab3",
),
],
),
),
),
),
];
}

return Scaffold(
body: SafeArea(
child: NestedScrollView(
headerSliverBuilder: _silverBuilder,
body: TabBarView(
controller: _tabController,
children: <Widget>[
MainPage(_datas),
ListView.builder(
itemCount: 50,
itemBuilder: (context, count) {
return Container(
height: 50,
color: Colors.primaries[count % Colors.primaries.length],
child: Text('aaaaa ${count.toString()}'),
);
}),
MainPage(_datas),
],
),
)),
);
}
}

class _SilverAppBarDelegate extends SliverPersistentHeaderDelegate {
_SilverAppBarDelegate(this.child);

final Widget child;

@override
double get minExtent => 44;

@override
double get maxExtent => 44;

@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
return new Container(
child: child,
);
}

@override
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
return false;
}
}

+ 121
- 0
lib/pages/wallet_page/wallet_page.dart 파일 보기

@@ -0,0 +1,121 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_bg_notifier.dart';
import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier.dart';
import 'package:zhiying_base_widget/widgets/others/mine_header_bg_widget.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class WalletPage extends StatefulWidget {
@override
_WalletPageState createState() => _WalletPageState();
}

class _WalletPageState extends State<WalletPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xfff9f9f9),
body: MultiProvider(
providers: [
ChangeNotifierProvider.value(value: MainPageNotifier()),
ChangeNotifierProvider.value(value: MainPageBgNotifier()),
],
child: _WalletPageContainer(),
),
);
}
}

class _WalletPageContainer extends StatefulWidget {
_WalletPageContainer({Key key}) : super(key: key);

@override
_WalletPageContainerState createState() => _WalletPageContainerState();
}

class _WalletPageContainerState extends State<_WalletPageContainer> {
final ScrollController _controller = ScrollController();
final RefreshController _refreshController =
RefreshController(initialRefresh: false);

@override
void initState() {
super.initState();
}

void _onLoading() async {
// await Future.delayed(Duration(milliseconds: 1000));
// if (mounted) setState(() {});
// _refreshController.loadComplete();
}

@override
Widget build(BuildContext context) {
return SmartRefresher(
controller: _refreshController,
enablePullDown: false,
enablePullUp: false,
header: WaterDropHeader(),
onLoading: _onLoading,
child: Container(
width: double.infinity,
child: Stack(
fit: StackFit.passthrough,
children: <Widget>[
MineHeaderBgWidget(
controller: _controller,
),
CustomScrollView(
slivers: _createContent(context),
),
Center(
child: FlatButton(
child: Text(
'aaaaaa',
style: TextStyle(color: Colors.black),
),
onPressed: () {
Provider.of<MainPageBgNotifier>(context, listen: false)
.switchBg(Container(
width: double.infinity,
height: 200,
color: Colors.purpleAccent,
));
},
),
)
],
),
),
);
}

List<Widget> _createContent(BuildContext context) {
List<Widget> list = List();

list.addAll(WidgetFactory.create(
'normal_nav',
isSliver: true,
model: Map(),
));
list.addAll(WidgetFactory.create(
'wallet_data',
isSliver: true,
model: Map(),
));
list.addAll(WidgetFactory.create(
'wallet_detail',
isSliver: true,
model: Map(),
));

list.addAll(WidgetFactory.create(
'wallet_income',
isSliver: true,
model: Map(),
));
return list;
}
}

+ 29
- 0
lib/pages/wallet_page/wallet_page_bloc.dart 파일 보기

@@ -0,0 +1,29 @@
import 'dart:async';

import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class WalletPageBloc extends BlocBase {
List<Map<String, dynamic>> _tabs = List();

StreamController<List<Map<String, dynamic>>> _tabController =
StreamController<List<Map<String, dynamic>>>();

Stream<List<Map<String, dynamic>>> get outData => _tabController.stream;

@override
void dispose() {
_tabController.close();
_tabController = null;
}

void refresh() {
NetUtil.request('/api/v1/config.json', onSuccess: (data) {
List list = data;
_tabs = list.map((item) {
return Map<String, dynamic>.from(item);
}).toList();
_tabController.add(_tabs);
});
}
}

+ 26
- 0
lib/pages/withdraw_page/bloc/withdraw_bloc.dart 파일 보기

@@ -0,0 +1,26 @@
import 'dart:async';

import 'package:zhiying_base_widget/pages/withdraw_page/withdraw_model.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class WithdrawBloc extends BlocBase {
WithdrawModel model;

StreamController<WithdrawModel> _dataController =
StreamController<WithdrawModel>();

Stream<WithdrawModel> get outData => _dataController.stream;

@override
void dispose() {
_dataController.close();
_dataController = null;
}

void refresh() {
NetUtil.request('/api/v1/config.json', onSuccess: (data) {
_dataController.add(model);
});
}
}

+ 1
- 0
lib/pages/withdraw_page/withdraw_model.dart 파일 보기

@@ -0,0 +1 @@
class WithdrawModel {}

+ 72
- 0
lib/pages/withdraw_page/withdraw_page.dart 파일 보기

@@ -0,0 +1,72 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

/*提现页面*/
class WithdrawPage extends StatefulWidget {
@override
_WithdrawPageState createState() => _WithdrawPageState();
}

class _WithdrawPageState extends State<WithdrawPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: _createNav(),
body: SafeArea(
child: _WithdrawContainer(),
),
);
}

// 导航栏
Widget _createNav() {
return CupertinoNavigationBar(
leading: Navigator.canPop(context)
? GestureDetector(
child: Container(
padding: EdgeInsets.zero,
child: Icon(
Icons.arrow_back_ios,
size: 20,
),
),
onTap: () {
if (Navigator.canPop(context)) {
Navigator.pop(context);
}
},
)
: Container(),
middle: Text(
'提现',
style: TextStyle(
fontSize: 15,
color: Color(0xff333333),
),
),
trailing: GestureDetector(
child: Text(
'明细',
style: TextStyle(fontSize: 13, color: Color(0xff333333)),
),
onTap: () {},
),
);
}
}

class _WithdrawContainer extends StatefulWidget {
@override
_WithdrawContainerState createState() => _WithdrawContainerState();
}

class _WithdrawContainerState extends State<_WithdrawContainer> {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
children: <Widget>[],
),
);
}
}

+ 26
- 8
lib/register.dart 파일 보기

@@ -1,11 +1,16 @@
import 'package:zhiying_base_widget/pages/home_page/home_page.dart';
import 'package:zhiying_base_widget/pages/login_page/login_page.dart';
import 'package:zhiying_base_widget/pages/main_page/main_page.dart';
import 'package:zhiying_base_widget/widgets/home_banner/home_banner_creater.dart';
import 'package:zhiying_base_widget/widgets/home_goods/home_goods_creater.dart';
import 'package:zhiying_base_widget/widgets/home_quick_entry/home_quick_entry_creater.dart';
import 'package:zhiying_base_widget/widgets/home_slide_banner/home_slide_banner_creater.dart';
import 'package:zhiying_base_widget/widgets/mine_header/mine_header_creater.dart';
import 'package:zhiying_base_widget/pages/wallet_page/wallet_page.dart';
import 'package:zhiying_base_widget/widgets/home/home_banner/home_banner_creater.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_creater.dart';
import 'package:zhiying_base_widget/widgets/home/home_quick_entry/home_quick_entry_creater.dart';
import 'package:zhiying_base_widget/widgets/home/home_slide_banner/home_slide_banner_creater.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_header/mine_header.dart';
import 'package:zhiying_base_widget/widgets/others/normal_nav/normal_nav_creater.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_data/wallet_data.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_income/wallet_income.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class BaseWidgetRegister {
@@ -20,10 +25,15 @@ class BaseWidgetRegister {
PageFactory.regist('homePage', (model) => HomePage());
PageFactory.regist('index', (model) => MainPage(model));
PageFactory.regist('login', (model) => LoginPage(model));
PageFactory.regist('category', (model) => WalletPage());
}

// 注册控件
static void registWidgets() {
// ==================== 通用组件
// 导航栏
WidgetFactory.regist('normal_nav', NormalNavCreater());

// ==================== 首页
/// 可滚动banner
WidgetFactory.regist('index_carousel', HomeSlideBannerCreater());
@@ -39,8 +49,16 @@ class BaseWidgetRegister {
WidgetFactory.regist('index_banner_two', HomeBannerCreater());

// ==================== 个人中心
WidgetFactory.regist('index_title', MineHeaderCreater());
// WidgetFactory.regist('index_search', MineHeaderBgCreater());
// WidgetFactory.regist('index_search', MineQuickEntryCreater());
WidgetFactory.regist(
'index_title', DefaultWidgetCreater((model) => MineHeader()));

// ==================== 钱包
WidgetFactory.regist(
'wallet_data', DefaultWidgetCreater((model) => WalletData()));
WidgetFactory.regist(
'wallet_detail', DefaultWidgetCreater((model) => WalletDetail()));

WidgetFactory.regist(
'wallet_income', DefaultWidgetCreater((model) => WalletIncome()));
}
}

lib/widgets/home_banner/bloc/bloc.dart → lib/widgets/home/home_banner/bloc/bloc.dart 파일 보기


lib/widgets/home_banner/bloc/home_banner_bloc.dart → lib/widgets/home/home_banner/bloc/home_banner_bloc.dart 파일 보기

@@ -1,10 +1,12 @@
import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:flutter/cupertino.dart';
import 'package:zhiying_base_widget/widgets/home_banner/bloc/home_banner_repository.dart';
import './bloc.dart';
import 'package:zhiying_base_widget/widgets/home/home_banner/bloc/home_banner_repository.dart';
import 'package:zhiying_comm/util/empty_util.dart';

import './bloc.dart';

class HomeBannerBloc extends Bloc<HomeBannerEvent, HomeBannerState> {
HomeBannerRepository repository;

@@ -24,7 +26,8 @@ class HomeBannerBloc extends Bloc<HomeBannerEvent, HomeBannerState> {
}

/// 初始化
Stream<HomeBannerState> _mapHomeBannerInitEventToState(HomeBannerInitEvent event) async* {
Stream<HomeBannerState> _mapHomeBannerInitEventToState(
HomeBannerInitEvent event) async* {
var cache = await repository.fetchCacheData(modId: event.model['mod_id']);
if (!EmptyUtil.isEmpty(cache)) yield HomeBannerCacheState();
var result = await repository.fetchNetData(modId: event.model['mod_id']);

lib/widgets/home_banner/bloc/home_banner_event.dart → lib/widgets/home/home_banner/bloc/home_banner_event.dart 파일 보기


lib/widgets/home_banner/bloc/home_banner_repository.dart → lib/widgets/home/home_banner/bloc/home_banner_repository.dart 파일 보기

@@ -1,12 +1,14 @@
import 'package:flutter/cupertino.dart';
import 'package:zhiying_base_widget/widgets/home_banner/model/HomeBannerModel.dart';
import 'package:zhiying_comm/util/net_util.dart';
import 'package:zhiying_base_widget/widgets/home/home_banner/model/HomeBannerModel.dart';
import 'package:zhiying_comm/util/empty_util.dart';
import 'package:zhiying_comm/util/net_util.dart';

class HomeBannerRepository {
/// 读取缓存数据
Future<HomeBannerModel> fetchCacheData({@required int modId}) async {
var reult = await NetUtil.getRequestCachedData('/api/v1/mod', params: {'ids': [modId]});
var reult = await NetUtil.getRequestCachedData('/api/v1/mod', params: {
'ids': [modId]
});
if (!EmptyUtil.isEmpty(reult)) {
return HomeBannerModel();
}
@@ -15,7 +17,9 @@ class HomeBannerRepository {

/// 获取网路数据
Future<HomeBannerModel> fetchNetData({@required int modId}) async {
var result = await NetUtil.post('/api/v1/mod', params: {'ids': [modId]});
var result = await NetUtil.post('/api/v1/mod', params: {
'ids': [modId]
});
if (NetUtil.isSuccess(result)) {
return HomeBannerModel();
}

lib/widgets/home_banner/bloc/home_banner_state.dart → lib/widgets/home/home_banner/bloc/home_banner_state.dart 파일 보기


lib/widgets/home_banner/home_banner_creater.dart → lib/widgets/home/home_banner/home_banner_creater.dart 파일 보기

@@ -1,15 +1,13 @@

import 'package:flutter/src/widgets/framework.dart';
import 'package:zhiying_base_widget/widgets/home_banner/home_banner_widget.dart';
import 'package:zhiying_base_widget/widgets/home/home_banner/home_banner_widget.dart';
import 'package:zhiying_comm/zhiying_comm.dart';


///
/// 不可滚动Banner
///
class HomeBannerCreater extends WidgetCreater{
class HomeBannerCreater extends WidgetCreater {
@override
List<Widget> createWidgets(Map<String, dynamic> model) {
return [HomeBannerWidget(model)];
}
}
}

lib/widgets/home_banner/home_banner_sk.dart → lib/widgets/home/home_banner/home_banner_sk.dart 파일 보기


lib/widgets/home_banner/home_banner_widget.dart → lib/widgets/home/home_banner/home_banner_widget.dart 파일 보기

@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:zhiying_base_widget/widgets/home_banner/bloc/bloc.dart';
import 'package:zhiying_base_widget/widgets/home_banner/bloc/home_banner_repository.dart';
import 'package:zhiying_base_widget/widgets/home_banner/home_banner_sk.dart';
import 'package:zhiying_base_widget/widgets/home/home_banner/bloc/bloc.dart';
import 'package:zhiying_base_widget/widgets/home/home_banner/bloc/home_banner_repository.dart';
import 'package:zhiying_base_widget/widgets/home/home_banner/home_banner_sk.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

///
@@ -21,7 +21,8 @@ class _HomeBannerWidgetState extends State<HomeBannerWidget> {
@override
Widget build(BuildContext context) {
return BlocProvider<HomeBannerBloc>(
create: (_) => HomeBannerBloc(repository: HomeBannerRepository())..add(HomeBannerInitEvent(widget.model)),
create: (_) => HomeBannerBloc(repository: HomeBannerRepository())
..add(HomeBannerInitEvent(widget.model)),
child: HomeBannerContainer(
model: widget.model,
),
@@ -50,13 +51,16 @@ class _HomeBannerContainerState extends State<HomeBannerContainer> {
return true;
},
builder: (context, state) {

print(state);
if (state is HomeBannerLoadedState) {
return ItemWidget(data: [1,2,3],);
return ItemWidget(
data: [1, 2, 3],
);
}
if (state is HomeBannerCacheState) {
return ItemWidget(data: [1,2],);
return ItemWidget(
data: [1, 2],
);
}

return HomeBannerSkeleton(widget.model);
@@ -66,8 +70,8 @@ class _HomeBannerContainerState extends State<HomeBannerContainer> {
}

class ItemWidget extends StatelessWidget {

final List data;

ItemWidget({this.data});

@override
@@ -76,15 +80,14 @@ class ItemWidget extends StatelessWidget {
height: 180.h,
margin: EdgeInsets.only(top: 7.5, left: 2.5, right: 2.5),
child: Row(
children:data.map((index){
children: data.map((index) {
return Flexible(
flex: 1,
child: Container(
margin: EdgeInsets.only( left: 5, right: 5),
margin: EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
color: Colors.lightBlue,
borderRadius: BorderRadius.circular(7.5)
),
borderRadius: BorderRadius.circular(7.5)),
),
);
}).toList(),
@@ -92,4 +95,3 @@ class ItemWidget extends StatelessWidget {
);
}
}


lib/widgets/home_banner/model/HomeBannerModel.dart → lib/widgets/home/home_banner/model/HomeBannerModel.dart 파일 보기


lib/widgets/home_goods/bloc/home_goods_bloc.dart → lib/widgets/home/home_goods/bloc/home_goods_bloc.dart 파일 보기

@@ -1,13 +1,12 @@
import 'dart:async';

import 'package:zhiying_base_widget/widgets/home_goods/models/home_goods_model.dart';
import 'package:zhiying_base_widget/widgets/home_goods/models/home_goods_style_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_style_model.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class HomeGoodsBloc extends BlocBase {
List<HomeGoodsModel> _goods = List();
String storeName = '';
HomeGoodsStyleModel style;

String _provider = '';
@@ -54,9 +53,6 @@ class HomeGoodsBloc extends BlocBase {
style = HomeGoodsStyleModel.fromJson(
Map<String, dynamic>.from(json['style']));
}
if (json.containsKey('provider_name')) {
storeName = json['provider_name'].toString();
}

_goodsController.add(_goods);
});

lib/widgets/home_goods/bloc/home_goods_header_bloc.dart → lib/widgets/home/home_goods/bloc/home_goods_header_bloc.dart 파일 보기

@@ -1,14 +1,15 @@
import 'dart:async';

import 'package:zhiying_base_widget/widgets/home_goods/models/home_goods_header_model.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_header_model.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class HomeGoodsHeaderBloc extends BlocBase {
List<HomeGoodsHeaderModel> _tabs = List();

StreamController<List<HomeGoodsHeaderModel>> _tabController =
StreamController<List<HomeGoodsHeaderModel>>();

Stream<List<HomeGoodsHeaderModel>> get outData => _tabController.stream;

@override
@@ -22,19 +23,25 @@ class HomeGoodsHeaderBloc extends BlocBase {
method: NetMethod.POST,
params: Map<String, dynamic>.from({
'ids': [id]
}),
onCache: (data) {}, onSuccess: (data) {
String key = id.toString();

Map<String, dynamic> json = Map<String, dynamic>.from(data);
if (json.containsKey(key)) {
List<dynamic> list = json[key];
_tabs = list.map((item) {
return HomeGoodsHeaderModel.fromJson(Map<String, dynamic>.from(item));
}).toList();
}), onCache: (data) {
if (data != null) {
_loadData(id, data);
}
_tabController.add(_tabs);
}, onSuccess: (data) {
_loadData(id, data);
});
}

void _loadData(int id, dynamic data) {
String key = id.toString();
Map<String, dynamic> json = Map<String, dynamic>.from(data);
if (json.containsKey(key)) {
List<dynamic> list = json[key];
_tabs = list.map((item) {
return HomeGoodsHeaderModel.fromJson(Map<String, dynamic>.from(item));
}).toList();
}

_tabController.add(_tabs);
}
}

lib/widgets/home_goods/home_goods.dart → lib/widgets/home/home_goods/home_goods.dart 파일 보기

@@ -3,11 +3,11 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_notifier.dart';
import 'package:zhiying_base_widget/widgets/home_goods/bloc/home_goods_bloc.dart';
import 'package:zhiying_base_widget/widgets/home_goods/home_goods_creater.dart';
import 'package:zhiying_base_widget/widgets/home_goods/home_goods_item.dart';
import 'package:zhiying_base_widget/widgets/home_goods/models/home_goods_model.dart';
import 'package:zhiying_base_widget/widgets/home_goods/skeleton/home_goods_sk.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/bloc/home_goods_bloc.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_creater.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_item.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/skeleton/home_goods_sk.dart';
import 'package:zhiying_comm/util/base_bloc.dart';

class HomeGoods extends StatefulWidget {
@@ -92,7 +92,6 @@ class _HomeGoodsContainerState extends State<_HomeGoodsContainer> {
goods[index],
_bloc.style,
data: widget.data,
shop: _bloc.storeName,
);
});
},

lib/widgets/home_goods/home_goods_creater.dart → lib/widgets/home/home_goods/home_goods_creater.dart 파일 보기

@@ -1,8 +1,8 @@
import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/home_goods/bloc/home_goods_header_bloc.dart';
import 'package:zhiying_base_widget/widgets/home_goods/home_goods.dart';
import 'package:zhiying_base_widget/widgets/home_goods/home_goods_header.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/bloc/home_goods_header_bloc.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_header.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';


lib/widgets/home_goods/home_goods_header.dart → lib/widgets/home/home_goods/home_goods_header.dart 파일 보기

@@ -1,10 +1,10 @@
import 'package:event_bus/event_bus.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/home_goods/bloc/home_goods_header_bloc.dart';
import 'package:zhiying_base_widget/widgets/home_goods/home_goods_creater.dart';
import 'package:zhiying_base_widget/widgets/home_goods/models/home_goods_header_model.dart';
import 'package:zhiying_base_widget/widgets/home_goods/skeleton/home_goods_header_sk.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/bloc/home_goods_header_bloc.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/home_goods_creater.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_header_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/skeleton/home_goods_header_sk.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';


lib/widgets/home_goods/home_goods_item.dart → lib/widgets/home/home_goods/home_goods_item.dart 파일 보기

@@ -2,18 +2,17 @@ import 'dart:convert';

import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/home_goods/models/home_goods_model.dart';
import 'package:zhiying_base_widget/widgets/home_goods/models/home_goods_style_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_style_model.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

// ignore: must_be_immutable
class HomeGoodsItem extends StatelessWidget {
final HomeGoodsModel goods;
final HomeGoodsStyleModel style;
final String shop;
Map<String, dynamic> data;

HomeGoodsItem(this.goods, this.style, {Key key, this.data, this.shop})
HomeGoodsItem(this.goods, this.style, {Key key, this.data})
: super(key: key) {
if (this.data != null && this.data.containsKey('data')) {
String data = this.data['data'];
@@ -71,21 +70,22 @@ class HomeGoodsItem extends StatelessWidget {

Widget _createTitle() {
List<InlineSpan> list = List();
if (shop != null && shop != '') {
if (goods.providerName != null && goods.providerName != '') {
list.add(WidgetSpan(
child: Container(
padding: EdgeInsets.only(left: 2, right: 2, top: 3, bottom: 3),
margin: EdgeInsets.only(right: 4),
child: Text(
shop,
goods.providerName,
style: TextStyle(
fontSize: 9,
height: 1,
color: HexColor.fromHex('#ffffff'),
color: HexColor.fromHex(style.providerNameColor),
),
),
decoration: BoxDecoration(
color: Colors.red, borderRadius: BorderRadius.circular(2.5)),
color: HexColor.fromHex(style.providerNameBackgroundColor),
borderRadius: BorderRadius.circular(2.5)),
),
));
}

lib/widgets/home_goods/models/home_goods_header_model.dart → lib/widgets/home/home_goods/models/home_goods_header_model.dart 파일 보기


lib/widgets/home_goods/models/home_goods_header_model.g.dart → lib/widgets/home/home_goods/models/home_goods_header_model.g.dart 파일 보기


lib/widgets/home_goods/models/home_goods_model.dart → lib/widgets/home/home_goods/models/home_goods_model.dart 파일 보기


lib/widgets/home_goods/models/home_goods_model.g.dart → lib/widgets/home/home_goods/models/home_goods_model.g.dart 파일 보기


lib/widgets/home_goods/models/home_goods_style_model.dart → lib/widgets/home/home_goods/models/home_goods_style_model.dart 파일 보기


lib/widgets/home_goods/models/home_goods_style_model.g.dart → lib/widgets/home/home_goods/models/home_goods_style_model.g.dart 파일 보기


lib/widgets/home_goods/skeleton/home_goods_header_sk.dart → lib/widgets/home/home_goods/skeleton/home_goods_header_sk.dart 파일 보기


lib/widgets/home_goods/skeleton/home_goods_item_sk.dart → lib/widgets/home/home_goods/skeleton/home_goods_item_sk.dart 파일 보기


lib/widgets/home_goods/skeleton/home_goods_sk.dart → lib/widgets/home/home_goods/skeleton/home_goods_sk.dart 파일 보기

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/home_goods/skeleton/home_goods_item_sk.dart';
import 'package:zhiying_base_widget/widgets/home/home_goods/skeleton/home_goods_item_sk.dart';

class HomeGoodsSkeleton extends StatelessWidget {
const HomeGoodsSkeleton({Key key}) : super(key: key);

+ 100
- 0
lib/widgets/home/home_goods_tab/home_goods_tab.dart 파일 보기

@@ -0,0 +1,100 @@
import 'package:flutter/material.dart';

class HomeGoodsTab extends StatefulWidget {
@override
_HomeGoodsTabState createState() => _HomeGoodsTabState();
}

class _HomeGoodsTabState extends State<HomeGoodsTab>
with TickerProviderStateMixin {
TabController _tabController;

@override
void initState() {
_tabController = TabController(length: 3, vsync: this);
super.initState();
}

@override
Widget build(BuildContext context) {
List<Widget> _silverBuilder(BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(),
SliverPersistentHeader(
pinned: true,
delegate: _SilverAppBarDelegate(
Container(
color: Colors.amber,
child: TabBar(
labelColor: Colors.blue,
unselectedLabelColor: Colors.black,
controller: _tabController,
tabs: <Widget>[
new Tab(
text: "tab1",
),
new Tab(
text: "tab2",
),
new Tab(
text: "tab3",
),
],
),
),
),
),
];
}

return SliverPersistentHeader(
pinned: true,
delegate: _SilverAppBarDelegate(
Container(
color: Colors.amber,
child: TabBar(
labelColor: Colors.blue,
unselectedLabelColor: Colors.black,
controller: _tabController,
tabs: <Widget>[
new Tab(
text: "tab1",
),
new Tab(
text: "tab2",
),
new Tab(
text: "tab3",
),
],
),
),
),
);
}
}

class _SilverAppBarDelegate extends SliverPersistentHeaderDelegate {
_SilverAppBarDelegate(this.child);

final Widget child;

@override
double get minExtent => 44;

@override
double get maxExtent => 44;

@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
return new Container(
child: child,
);
}

@override
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
return false;
}
}

+ 21
- 0
lib/widgets/home/home_goods_tab/home_goods_tab_creater.dart 파일 보기

@@ -0,0 +1,21 @@
import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class HomeGoodsTabCreater extends WidgetCreater {
final EventBus _eventBus = EventBus();

@override
List<Widget> createWidgets(Map<String, dynamic> model) {
print('创建商品列表');

return [
// TestPage(),
];
}

@override
bool isSliverChild() {
return false;
}
}

lib/widgets/home_quick_entry/bloc/bloc.dart → lib/widgets/home/home_quick_entry/bloc/bloc.dart 파일 보기


lib/widgets/home_quick_entry/bloc/home_quick_entry_bloc.dart → lib/widgets/home/home_quick_entry/bloc/home_quick_entry_bloc.dart 파일 보기

@@ -1,11 +1,14 @@
import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:flutter/cupertino.dart';
import 'package:zhiying_base_widget/widgets/home_quick_entry/bloc/home_quick_entry_repository.dart';
import './bloc.dart';
import 'package:zhiying_base_widget/widgets/home/home_quick_entry/bloc/home_quick_entry_repository.dart';
import 'package:zhiying_comm/util/empty_util.dart';

class HomeQuickEntryBloc extends Bloc<HomeQuickEntryEvent, HomeQuickEntryState> {
import './bloc.dart';

class HomeQuickEntryBloc
extends Bloc<HomeQuickEntryEvent, HomeQuickEntryState> {
HomeQuickEntryRepository repository;

HomeQuickEntryBloc({@required this.repository});
@@ -14,7 +17,8 @@ class HomeQuickEntryBloc extends Bloc<HomeQuickEntryEvent, HomeQuickEntryState>
HomeQuickEntryState get initialState => InitialHomeQuickEntryState();

@override
Stream<HomeQuickEntryState> mapEventToState(HomeQuickEntryEvent event) async* {
Stream<HomeQuickEntryState> mapEventToState(
HomeQuickEntryEvent event) async* {
final currentState = state;
if (event is HomeQuickEntryInitEvent) {
yield* _mapHomeQuickEntryInitToState(event);
@@ -22,7 +26,8 @@ class HomeQuickEntryBloc extends Bloc<HomeQuickEntryEvent, HomeQuickEntryState>
}

/// 初始化
Stream<HomeQuickEntryState> _mapHomeQuickEntryInitToState(HomeQuickEntryInitEvent event) async* {
Stream<HomeQuickEntryState> _mapHomeQuickEntryInitToState(
HomeQuickEntryInitEvent event) async* {
/// 获取缓存数据
var cached = await repository.fetchCachedData();
if (!EmptyUtil.isEmpty(cached)) {

lib/widgets/home_quick_entry/bloc/home_quick_entry_event.dart → lib/widgets/home/home_quick_entry/bloc/home_quick_entry_event.dart 파일 보기


lib/widgets/home_quick_entry/bloc/home_quick_entry_repository.dart → lib/widgets/home/home_quick_entry/bloc/home_quick_entry_repository.dart 파일 보기


lib/widgets/home_quick_entry/bloc/home_quick_entry_state.dart → lib/widgets/home/home_quick_entry/bloc/home_quick_entry_state.dart 파일 보기


lib/widgets/home_quick_entry/cached_network_image_util.dart → lib/widgets/home/home_quick_entry/cached_network_image_util.dart 파일 보기


lib/widgets/home_quick_entry/home_quick_entry_creater.dart → lib/widgets/home/home_quick_entry/home_quick_entry_creater.dart 파일 보기


lib/widgets/home_quick_entry/home_quick_entry_sk.dart → lib/widgets/home/home_quick_entry/home_quick_entry_sk.dart 파일 보기


lib/widgets/home_quick_entry/home_quick_entry_widget.dart → lib/widgets/home/home_quick_entry/home_quick_entry_widget.dart 파일 보기


lib/widgets/home_quick_entry/model/home_quick_entry_model.dart → lib/widgets/home/home_quick_entry/model/home_quick_entry_model.dart 파일 보기


lib/widgets/home_slide_banner/bloc/bloc.dart → lib/widgets/home/home_slide_banner/bloc/bloc.dart 파일 보기


lib/widgets/home_slide_banner/bloc/home_slide_banner_bloc.dart → lib/widgets/home/home_slide_banner/bloc/home_slide_banner_bloc.dart 파일 보기

@@ -1,13 +1,16 @@
import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:flutter/cupertino.dart';
import 'package:zhiying_base_widget/widgets/home_slide_banner/bloc/home_slide_banner_event.dart';
import 'package:zhiying_base_widget/widgets/home_slide_banner/bloc/home_slide_banner_repository.dart';
import 'package:zhiying_base_widget/widgets/home_slide_banner/bloc/home_slide_banner_state.dart';
import './bloc.dart';
import 'package:zhiying_base_widget/widgets/home/home_slide_banner/bloc/home_slide_banner_event.dart';
import 'package:zhiying_base_widget/widgets/home/home_slide_banner/bloc/home_slide_banner_repository.dart';
import 'package:zhiying_base_widget/widgets/home/home_slide_banner/bloc/home_slide_banner_state.dart';
import 'package:zhiying_comm/util/empty_util.dart';

class HomeSlideBannerBloc extends Bloc<HomeSlideBannerEvent, HomeSlideBannerState> {
import './bloc.dart';

class HomeSlideBannerBloc
extends Bloc<HomeSlideBannerEvent, HomeSlideBannerState> {
HomeSlideBannerRepository repository;

HomeSlideBannerBloc({@required this.repository});
@@ -16,7 +19,8 @@ class HomeSlideBannerBloc extends Bloc<HomeSlideBannerEvent, HomeSlideBannerStat
HomeSlideBannerState get initialState => InitialHomeSlideBannerState();

@override
Stream<HomeSlideBannerState> mapEventToState(HomeSlideBannerEvent event) async* {
Stream<HomeSlideBannerState> mapEventToState(
HomeSlideBannerEvent event) async* {
final currentState = state;

/// 初始化
@@ -27,10 +31,12 @@ class HomeSlideBannerBloc extends Bloc<HomeSlideBannerEvent, HomeSlideBannerStat
}

/// 初始化
Stream<HomeSlideBannerState> _mapInitEventToState(HomeBannerInitEvent event) async* {
Stream<HomeSlideBannerState> _mapInitEventToState(
HomeBannerInitEvent event) async* {
var cached = await repository.fetchCachedDate(id: event.model['mod_id']);
if (!EmptyUtil.isEmpty(cached)) yield HomeSlideBannerCachedState(datas: cached);
var param = await repository.fetchData( id: event.model['mod_id']);
if (!EmptyUtil.isEmpty(cached))
yield HomeSlideBannerCachedState(datas: cached);
var param = await repository.fetchData(id: event.model['mod_id']);
if (!EmptyUtil.isEmpty(param))
yield HomeSlideBannerLoadedState(datas: param);
else

lib/widgets/home_slide_banner/bloc/home_slide_banner_event.dart → lib/widgets/home/home_slide_banner/bloc/home_slide_banner_event.dart 파일 보기


+ 37
- 0
lib/widgets/home/home_slide_banner/bloc/home_slide_banner_repository.dart 파일 보기

@@ -0,0 +1,37 @@
import 'package:flutter/cupertino.dart';
import 'package:zhiying_base_widget/widgets/home/home_slide_banner/model/home_slide_banner_model.dart';
import 'package:zhiying_comm/util/empty_util.dart';
import 'package:zhiying_comm/util/global_config.dart';
import 'package:zhiying_comm/util/net_util.dart';

class HomeSlideBannerRepository {
/// 获取缓存数据
Future<List<HomeSlideBannerModelItems>> fetchCachedDate(
{@required int id}) async {
var cached = await NetUtil.getRequestCachedData('/api/v1/mod', params: {
'ids': [id]
});
if (!EmptyUtil.isEmpty(cached)) {
HomeSlideBannerModel model = HomeSlideBannerModel.fromJson(cached);
if (null != model && !EmptyUtil.isEmpty(model.items)) {
return model.items;
}
}
return null;
}

/// 获取数据
Future<List<HomeSlideBannerModelItems>> fetchData({@required int id}) async {
var params = await NetUtil.post('/api/v1/mod', params: {
'ids': [id]
});
if (!EmptyUtil.isEmpty(params) && NetUtil.isSuccess(params)) {
HomeSlideBannerModel model = HomeSlideBannerModel.fromJson(
params[GlobalConfig.HTTP_RESPONSE_KEY_DATA]);
if (null != model && !EmptyUtil.isEmpty(model.items)) {
return model.items;
}
}
return null;
}
}

lib/widgets/home_slide_banner/bloc/home_slide_banner_state.dart → lib/widgets/home/home_slide_banner/bloc/home_slide_banner_state.dart 파일 보기

@@ -1,5 +1,5 @@
import 'package:equatable/equatable.dart';
import 'package:zhiying_base_widget/widgets/home_slide_banner/model/home_slide_banner_model.dart';
import 'package:zhiying_base_widget/widgets/home/home_slide_banner/model/home_slide_banner_model.dart';

abstract class HomeSlideBannerState extends Equatable {
const HomeSlideBannerState();
@@ -30,7 +30,8 @@ class HomeSlideBannerLoadedState extends HomeSlideBannerState {

HomeSlideBannerLoadedState({this.datas});

HomeSlideBannerLoadedState copyWith({List<HomeSlideBannerModelItems> newData}) {
HomeSlideBannerLoadedState copyWith(
{List<HomeSlideBannerModelItems> newData}) {
return HomeSlideBannerLoadedState(
datas: newData ?? datas,
);

lib/widgets/home_slide_banner/home_slide_banner.dart → lib/widgets/home/home_slide_banner/home_slide_banner.dart 파일 보기


lib/widgets/home_slide_banner/home_slide_banner_creater.dart → lib/widgets/home/home_slide_banner/home_slide_banner_creater.dart 파일 보기


lib/widgets/home_slide_banner/home_slide_banner_sk.dart → lib/widgets/home/home_slide_banner/home_slide_banner_sk.dart 파일 보기


lib/widgets/home_slide_banner/model/home_slide_banner_model.dart → lib/widgets/home/home_slide_banner/model/home_slide_banner_model.dart 파일 보기


+ 0
- 34
lib/widgets/home_slide_banner/bloc/home_slide_banner_repository.dart 파일 보기

@@ -1,34 +0,0 @@

import 'package:flutter/cupertino.dart';
import 'package:zhiying_base_widget/widgets/home_slide_banner/model/home_slide_banner_model.dart';
import 'package:zhiying_comm/util/net_util.dart';
import 'package:zhiying_comm/util/empty_util.dart';
import 'package:zhiying_comm/util/global_config.dart';

class HomeSlideBannerRepository{

/// 获取缓存数据
Future<List<HomeSlideBannerModelItems>> fetchCachedDate({@required int id}) async{
var cached = await NetUtil.getRequestCachedData('/api/v1/mod', params: {'ids': [id]});
if(!EmptyUtil.isEmpty(cached)){
HomeSlideBannerModel model = HomeSlideBannerModel.fromJson(cached);
if(null != model && !EmptyUtil.isEmpty(model.items)){
return model.items;
}
}
return null;
}

/// 获取数据
Future<List<HomeSlideBannerModelItems>> fetchData({@required int id}) async{
var params = await NetUtil.post('/api/v1/mod', params: {'ids': [id]});
if(!EmptyUtil.isEmpty(params) && NetUtil.isSuccess(params)){
HomeSlideBannerModel model = HomeSlideBannerModel.fromJson(params[GlobalConfig.HTTP_RESPONSE_KEY_DATA]);
if(null != model && !EmptyUtil.isEmpty(model.items)){
return model.items;
}
}
return null;
}

}

+ 14
- 0
lib/widgets/mine/mine_data/mine_data.dart 파일 보기

@@ -0,0 +1,14 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_data/mine_data_sk.dart';

class MineData extends StatefulWidget {
@override
_MineDataState createState() => _MineDataState();
}

class _MineDataState extends State<MineData> {
@override
Widget build(BuildContext context) {
return MineDataSkeleton();
}
}

+ 12
- 0
lib/widgets/mine/mine_data/mine_data_creater.dart 파일 보기

@@ -0,0 +1,12 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_data/mine_data.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class MineDataCreater extends WidgetCreater {
@override
List<Widget> createWidgets(Map<String, dynamic> model) {
return [
MineData(),
];
}
}

+ 122
- 0
lib/widgets/mine/mine_data/mine_data_sk.dart 파일 보기

@@ -0,0 +1,122 @@
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

class MineDataSkeleton extends StatefulWidget {
@override
_MineDataSkeletonState createState() => _MineDataSkeletonState();
}

class _MineDataSkeletonState extends State<MineDataSkeleton> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 12.5, right: 12.5),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(7.5)),
child: Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
child: Column(
children: <Widget>[
Container(
width: double.infinity,
height: 62,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: _createText1(),
)
],
)
],
),
),
Container(
width: double.infinity,
height: 72,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: _createText2(),
),
Expanded(
child: _createText2(),
)
],
),
),
Container(
width: double.infinity,
height: 46,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
height: 15,
color: Colors.white,
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
height: 15,
color: Colors.white,
),
)
],
),
)
],
),
),
);
}

Widget _createText1() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15, right: 15),
height: 15,
color: Colors.white,
),
Container(
margin: EdgeInsets.only(left: 15, top: 4),
height: 15,
width: 120,
color: Colors.white,
),
],
);
}

Widget _createText2() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15),
height: 15,
width: 44,
color: Colors.white,
),
Container(
margin: EdgeInsets.only(left: 15, top: 6),
height: 15,
width: 64,
color: Colors.white,
),
],
);
}
}

+ 14
- 0
lib/widgets/mine/mine_header/mine_header.dart 파일 보기

@@ -0,0 +1,14 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'mine_header_sk.dart';

class MineHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
child: MineHeaderSkeleton(),
);
}
}

+ 12
- 0
lib/widgets/mine/mine_header/mine_header_creater.dart 파일 보기

@@ -0,0 +1,12 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_header/mine_header.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class MineHeaderCreater extends WidgetCreater {
@override
List<Widget> createWidgets(Map<String, dynamic> model) {
return [
MineHeader(),
];
}
}

+ 45
- 0
lib/widgets/mine/mine_header/mine_header_sk.dart 파일 보기

@@ -0,0 +1,45 @@
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

class MineHeaderSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
child: Container(
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 20, top: 20, bottom: 20, right: 12),
width: 56,
height: 56,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(28),
),
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width: 120,
height: 20,
color: Colors.white,
),
Container(
margin: EdgeInsets.only(top: 8),
width: 80,
height: 12,
color: Colors.white,
),
],
))
],
),
),
);
}
}

lib/widgets/mine_header/mine_header.dart → lib/widgets/mine/mine_nav/mine_nav.dart 파일 보기

@@ -3,10 +3,10 @@ import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class MineHeaderDelegate extends SliverPersistentHeaderDelegate {
class MineNavDelegate extends SliverPersistentHeaderDelegate {
double _height;

MineHeaderDelegate() : super() {
MineNavDelegate() : super() {
_height = MediaQueryData.fromWindow(window).padding.top + 44;
}

@@ -16,7 +16,7 @@ class MineHeaderDelegate extends SliverPersistentHeaderDelegate {
// print('${shrinkOffset.toString()}');
double percent = shrinkOffset / _height;
print('${percent.toString()}');
return MineHeader(Colors.red.withOpacity(percent));
return MineNav(Colors.red.withOpacity(percent));
}

@override
@@ -30,10 +30,10 @@ class MineHeaderDelegate extends SliverPersistentHeaderDelegate {
false; // 如果内容需要更新,设置为true
}

class MineHeader extends StatelessWidget {
class MineNav extends StatelessWidget {
final Color color;

MineHeader(this.color);
MineNav(this.color);

@override
Widget build(BuildContext context) {

lib/widgets/mine_header/mine_header_creater.dart → lib/widgets/mine/mine_nav/mine_nav_creater.dart 파일 보기

@@ -1,15 +1,15 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/mine_header/mine_header.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_nav/mine_nav.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class MineHeaderCreater extends WidgetCreater {
class MineNavCreater extends WidgetCreater {
@override
List<Widget> createWidgets(Map<String, dynamic> model) {
return [
SliverPersistentHeader(
pinned: true,
floating: false,
delegate: MineHeaderDelegate(),
delegate: MineNavDelegate(),
),
];
}

lib/widgets/mine_data/mine_data.dart → lib/widgets/mine/mine_nav/mine_nav_sk.dart 파일 보기


lib/widgets/mine_quick_entry/bloc/mine_quick_entry_bloc.dart → lib/widgets/mine/mine_quick_entry/bloc/mine_quick_entry_bloc.dart 파일 보기

@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:zhiying_base_widget/widgets/mine_quick_entry/models/mine_quick_entry_model.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_quick_entry/models/mine_quick_entry_model.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';


lib/widgets/mine_quick_entry/mine_quick_entry.dart → lib/widgets/mine/mine_quick_entry/mine_quick_entry.dart 파일 보기

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/mine_quick_entry/bloc/mine_quick_entry_bloc.dart';
import 'package:zhiying_base_widget/widgets/mine_quick_entry/mine_quick_entry_sk.dart';
import 'package:zhiying_base_widget/widgets/mine_quick_entry/models/mine_quick_entry_model.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_quick_entry/bloc/mine_quick_entry_bloc.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_quick_entry/mine_quick_entry_sk.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_quick_entry/models/mine_quick_entry_model.dart';
import 'package:zhiying_comm/util/base_bloc.dart';

class MineQuickEntry extends StatefulWidget {

lib/widgets/mine_quick_entry/mine_quick_entry_creater.dart → lib/widgets/mine/mine_quick_entry/mine_quick_entry_creater.dart 파일 보기

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/mine_quick_entry/mine_quick_entry.dart';
import 'package:zhiying_base_widget/widgets/mine/mine_quick_entry/mine_quick_entry.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class MineQuickEntryCreater extends WidgetCreater {

lib/widgets/mine_quick_entry/mine_quick_entry_sk.dart → lib/widgets/mine/mine_quick_entry/mine_quick_entry_sk.dart 파일 보기

@@ -5,6 +5,12 @@ class MineQuickEntrySkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
left: 12.5,
right: 12.5,
top: 6,
bottom: 6,
),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7.5), color: Colors.white),

lib/widgets/mine_quick_entry/models/mine_quick_entry_model.dart → lib/widgets/mine/mine_quick_entry/models/mine_quick_entry_model.dart 파일 보기


+ 0
- 0
파일 보기


+ 0
- 0
파일 보기


+ 0
- 0
파일 보기


+ 1
- 1
lib/widgets/others/mine_header_bg_widget.dart 파일 보기

@@ -54,7 +54,7 @@ class _MineHeaderBgWidgetState extends State<MineHeaderBgWidget> {

@override
Widget build(BuildContext context) {
print('mmine_hider_bg_widget build');
print('mine_header_bg_widget build ${_offsetY.toString()}');
return Transform.translate(
offset: Offset(0, _offsetY),
child: _content,


+ 104
- 0
lib/widgets/others/normal_nav/normal_nav.dart 파일 보기

@@ -0,0 +1,104 @@
import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/pages/mine_page/mine_page.dart';

class NormalNavDelegate extends SliverPersistentHeaderDelegate {
double _height;

NormalNavDelegate() : super() {
_height = MediaQueryData.fromWindow(window).padding.top + 44;
}

@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
print('${shrinkOffset.toString()}');
double percent = shrinkOffset / _height;
print('${percent.toString()}');
return NormalNav(Colors.red.withOpacity(percent));
}

@override
double get maxExtent => _height;

@override
double get minExtent => _height;

@override
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) =>
false; // 如果内容需要更新,设置为true
}

class NormalNav extends StatelessWidget {
final Color color;

NormalNav(this.color);

@override
Widget build(BuildContext context) {
return Container(
color: color,
child: Column(
children: <Widget>[
Expanded(child: Container()),
Container(
width: double.infinity,
height: 44,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Navigator.of(context).canPop()
? GestureDetector(
child: Container(
width: 44,
height: 44,
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
),
),
onTap: () {
if (Navigator.canPop(context)) {
Navigator.pop(context);
}
},
)
: Container(
width: 44,
height: 44,
),
Expanded(
child: Container(
child: Center(
child: Text(
'我的钱包',
style: TextStyle(fontSize: 18, color: Colors.white),
),
),
),
),
GestureDetector(
child: Container(
width: 44,
height: 44,
child: Icon(
Icons.settings,
color: Colors.white,
),
),
onTap: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return MinePage();
}));
},
),
],
),
)
],
));
}
}

+ 21
- 0
lib/widgets/others/normal_nav/normal_nav_creater.dart 파일 보기

@@ -0,0 +1,21 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/others/normal_nav/normal_nav.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class NormalNavCreater extends WidgetCreater {
@override
List<Widget> createWidgets(Map<String, dynamic> model) {
return [
SliverPersistentHeader(
pinned: true,
floating: true,
delegate: NormalNavDelegate(),
),
];
}

@override
bool isSliverChild() {
return true;
}
}

+ 13
- 0
lib/widgets/wallet/wallet_data/wallet_data.dart 파일 보기

@@ -0,0 +1,13 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_data/wallet_data_sk.dart';

class WalletData extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
child: WalletDataSkeleton(),
);
}
}

+ 12
- 0
lib/widgets/wallet/wallet_data/wallet_data_creater.dart 파일 보기

@@ -0,0 +1,12 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_data/wallet_data.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class WalletDataCreater extends WidgetCreater {
@override
List<Widget> createWidgets(Map<String, dynamic> model) {
return [
WalletData(),
];
}
}

+ 111
- 0
lib/widgets/wallet/wallet_data/wallet_data_sk.dart 파일 보기

@@ -0,0 +1,111 @@
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

class WalletDataSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(7.5)),
child: Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
child: Column(
children: <Widget>[
Container(
width: double.infinity,
height: 85,
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15),
width: 26,
height: 34,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4)),
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: _createText1(),
)
],
)
],
))
],
),
),
Container(
width: double.infinity,
height: 60,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: _createText2(),
),
Expanded(
child: _createText2(),
),
Expanded(
child: _createText2(),
)
],
),
),
],
),
),
);
}

Widget _createText1() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15),
height: 15,
width: 120,
color: Colors.white,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 4),
height: 15,
color: Colors.white,
),
],
);
}

Widget _createText2() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 15),
height: 15,
width: 44,
color: Colors.white,
),
Container(
margin: EdgeInsets.only(left: 15, top: 6),
height: 15,
width: 64,
color: Colors.white,
),
],
);
}
}

+ 18
- 0
lib/widgets/wallet/wallet_detail/wallet_detail.dart 파일 보기

@@ -0,0 +1,18 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/pages/withdraw_page/withdraw_page.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_detail/wallet_detail_sk.dart';

class WalletDetail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
child: WalletDetailSkeleton(),
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return WithdrawPage();
}));
},
);
}
}

+ 34
- 0
lib/widgets/wallet/wallet_detail/wallet_detail_sk.dart 파일 보기

@@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

class WalletDetailSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4),
padding: EdgeInsets.only(left: 15, right: 15, top: 10, bottom: 10),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(7.5)),
child: Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
child: Row(
children: <Widget>[
Container(
width: 18,
height: 18,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(9),
color: Colors.white),
),
Container(
margin: EdgeInsets.only(left: 8),
width: 120,
height: 14,
color: Colors.white,
),
],
)),
);
}
}

+ 9
- 0
lib/widgets/wallet/wallet_income/wallet_income.dart 파일 보기

@@ -0,0 +1,9 @@
import 'package:flutter/material.dart';
import 'package:zhiying_base_widget/widgets/wallet/wallet_income/wallet_income_sk.dart';

class WalletIncome extends StatelessWidget {
@override
Widget build(BuildContext context) {
return WalletIncomeSkeleton();
}
}

+ 104
- 0
lib/widgets/wallet/wallet_income/wallet_income_sk.dart 파일 보기

@@ -0,0 +1,104 @@
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';

class WalletIncomeSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4),
padding: EdgeInsets.only(left: 15, right: 15, top: 10, bottom: 10),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(7.5)),
child: Shimmer.fromColors(
baseColor: Colors.grey[300],
highlightColor: Colors.grey[100],
child: Column(
children: <Widget>[
Container(
width: double.infinity,
child: _createTab(),
),
Container(
margin: EdgeInsets.only(top: 6),
width: double.infinity,
child: _createTags(),
),
Container(
margin: EdgeInsets.only(top: 6),
height: 64,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7.5),
color: Colors.white),
),
_createDataRow(),
_createDataRow(),
_createDataRow(),
],
)),
);
}

Widget _createTab() {
return Row(
children: List.generate(5, (index) {
return Expanded(
child: Container(
height: 14,
margin: EdgeInsets.only(left: 10, right: 10, top: 4, bottom: 4),
color: Colors.white,
),
);
}),
);
}

Widget _createTags() {
return Row(
children: List.generate(5, (index) {
return Expanded(
child: Container(
height: 20,
margin: EdgeInsets.only(left: 10, right: 10, top: 4, bottom: 4),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10)),
),
);
}),
);
}

Widget _createDataRow() {
return Column(
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 8, bottom: 2),
width: 64,
height: 18,
color: Colors.white,
),
Row(
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.only(top: 6, right: 5),
height: 64,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7.5),
color: Colors.white),
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(top: 6, left: 5),
height: 64,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7.5),
color: Colors.white),
),
)
],
)
],
);
}
}

불러오는 중...
취소
저장