parent
72dd315af7
commit
591174f409
@ -1,4 +1,4 @@
|
||||
{
|
||||
"flutterSdkVersion": "2.0.2",
|
||||
"flutterSdkVersion": "2.8.0",
|
||||
"flavors": {}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
||||
import 'package:flustars/flustars.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'announce_list_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class AnnounceListModel {
|
||||
final int id;
|
||||
final String date;
|
||||
final String title;
|
||||
final String content;
|
||||
|
||||
String get month {
|
||||
var date = DateUtil.getDateTime(this.date);
|
||||
return date!.year.toString() + '年' + date.month.toString() + '月';
|
||||
}
|
||||
|
||||
factory AnnounceListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AnnounceListModelFromJson(json);
|
||||
|
||||
const AnnounceListModel({
|
||||
required this.id,
|
||||
required this.date,
|
||||
required this.title,
|
||||
required this.content,
|
||||
});
|
||||
|
||||
AnnounceListModel copyWith({
|
||||
int? id,
|
||||
String? date,
|
||||
String? title,
|
||||
String? content,
|
||||
}) {
|
||||
return AnnounceListModel(
|
||||
id: id ?? this.id,
|
||||
date: date ?? this.date,
|
||||
title: title ?? this.title,
|
||||
content: content ?? this.content,
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'announce_list_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
AnnounceListModel _$AnnounceListModelFromJson(Map<String, dynamic> json) =>
|
||||
AnnounceListModel(
|
||||
id: json['id'] as int,
|
||||
date: json['date'] as String,
|
||||
title: json['title'] as String,
|
||||
content: json['content'] as String,
|
||||
);
|
@ -0,0 +1,27 @@
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'reply_list_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ReplyListModel {
|
||||
final int id;
|
||||
final String name;
|
||||
final String date;
|
||||
final String content;
|
||||
final ImgModel img;
|
||||
final String title;
|
||||
final ImgModel pic;
|
||||
factory ReplyListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ReplyListModelFromJson(json);
|
||||
|
||||
const ReplyListModel({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.date,
|
||||
required this.content,
|
||||
required this.img,
|
||||
required this.title,
|
||||
required this.pic,
|
||||
});
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'reply_list_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ReplyListModel _$ReplyListModelFromJson(Map<String, dynamic> json) =>
|
||||
ReplyListModel(
|
||||
id: json['id'] as int,
|
||||
name: json['name'] as String,
|
||||
date: json['date'] as String,
|
||||
content: json['content'] as String,
|
||||
img: ImgModel.fromJson(json['img'] as Map<String, dynamic>),
|
||||
title: json['title'] as String,
|
||||
pic: ImgModel.fromJson(json['pic'] as Map<String, dynamic>),
|
||||
);
|
@ -0,0 +1,85 @@
|
||||
import 'package:aku_new_community/base/base_style.dart';
|
||||
import 'package:aku_new_community/extensions/widget_list_ext.dart';
|
||||
import 'package:aku_new_community/models/message/announce_list_model.dart';
|
||||
import 'package:aku_new_community/pages/message_center_page/announce/announce_view.dart';
|
||||
import 'package:flustars/flustars.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class AnnounceCard extends StatelessWidget {
|
||||
final ListDateModel modelList;
|
||||
final int index;
|
||||
const AnnounceCard({
|
||||
Key? key,
|
||||
required this.modelList,
|
||||
required this.index,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||
alignment: Alignment.centerLeft,
|
||||
width: double.infinity,
|
||||
height: 98.w,
|
||||
child: modelList.month.text.size(36.sp).black.make(),
|
||||
),
|
||||
...modelList.models
|
||||
.map((e) => _card(e))
|
||||
.toList()
|
||||
.sepWidget(separate: 10.heightBox)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _card(AnnounceListModel model) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
'${DateUtil.formatDateStr(model.date, format: 'dd日 HH:mm')}'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(ktextSubColor)
|
||||
.make(),
|
||||
32.w.heightBox,
|
||||
'${model.title}'.text.size(36.sp).black.bold.make(),
|
||||
32.w.heightBox,
|
||||
'${model.content}'.text.size(28.sp).color(ktextSubColor).make(),
|
||||
40.w.heightBox,
|
||||
Container(
|
||||
height: 72.w,
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Color(0xFF000000).withOpacity(0.06),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
'查看详情'.text.size(24.w).color(ktextSubColor).make(),
|
||||
Spacer(),
|
||||
Icon(
|
||||
CupertinoIcons.chevron_down,
|
||||
size: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,190 @@
|
||||
import 'package:aku_new_community/models/message/announce_list_model.dart';
|
||||
import 'package:aku_new_community/pages/message_center_page/announce/announce_card.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:scroll_to_index/scroll_to_index.dart';
|
||||
|
||||
class ListDateModel {
|
||||
final String month;
|
||||
final int index;
|
||||
final List<AnnounceListModel> models;
|
||||
|
||||
ListDateModel(this.month, this.models, this.index);
|
||||
}
|
||||
|
||||
class AnnounceView extends StatefulWidget {
|
||||
const AnnounceView({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AnnounceViewState createState() => _AnnounceViewState();
|
||||
}
|
||||
|
||||
class _AnnounceViewState extends State<AnnounceView> {
|
||||
EasyRefreshController _refreshController = EasyRefreshController();
|
||||
late AutoScrollController _autoScrollController;
|
||||
|
||||
List<ListDateModel> _modelLists = [];
|
||||
String _headMonth = '';
|
||||
|
||||
void monthListDepart(List<AnnounceListModel> models) {
|
||||
for (var item in models) {
|
||||
var index =
|
||||
_modelLists.indexWhere((element) => element.month == item.month);
|
||||
if (index >= 0) {
|
||||
_modelLists[index].models.add(item.copyWith());
|
||||
} else {
|
||||
_modelLists.insert(_modelLists.length,
|
||||
ListDateModel(item.month, [item.copyWith()], _modelLists.length));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_autoScrollController = AutoScrollController(
|
||||
viewportBoundaryGetter: () =>
|
||||
Rect.fromLTRB(0, 0, 0, MediaQuery.of(context).padding.top + 130.w),
|
||||
axis: Axis.vertical,
|
||||
);
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_refreshController.dispose();
|
||||
_autoScrollController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// Offstage(
|
||||
// offstage: _modelLists.isEmpty,
|
||||
// child: Container(
|
||||
// padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||
// width: double.infinity,
|
||||
// color: Color(0xFFF9F9F9),
|
||||
// height: 98.w,
|
||||
// child: Row(
|
||||
// children: [
|
||||
// '$_headMonth'.text.size(36.sp).color(ktextPrimary).bold.make(),
|
||||
// 20.w.widthBox,
|
||||
// _popupMenuButton(),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Flexible(
|
||||
child: EasyRefresh(
|
||||
firstRefresh: true,
|
||||
header: MaterialHeader(),
|
||||
footer: MaterialFooter(),
|
||||
scrollController: _autoScrollController,
|
||||
onRefresh: () async {
|
||||
_modelLists.clear();
|
||||
monthListDepart([
|
||||
AnnounceListModel(
|
||||
date: '2020-10-11 12:00:00',
|
||||
id: 1,
|
||||
content: 'aaaaaa',
|
||||
title: '11111'),
|
||||
AnnounceListModel(
|
||||
date: '2020-10-11 12:00:00',
|
||||
id: 2,
|
||||
content: 'bbbbbbb',
|
||||
title: '222222'),
|
||||
AnnounceListModel(
|
||||
date: '2020-11-11 12:00:00',
|
||||
id: 3,
|
||||
content: 'cccccccc',
|
||||
title: '33333'),
|
||||
AnnounceListModel(
|
||||
date: '2020-11-11 12:00:00',
|
||||
id: 4,
|
||||
content: 'ddddddd',
|
||||
title: '44444'),
|
||||
AnnounceListModel(
|
||||
date: '2020-12-11 12:00:00',
|
||||
id: 5,
|
||||
content: 'eeeeeee',
|
||||
title: '555555'),
|
||||
AnnounceListModel(
|
||||
date: '2020-11-11 12:00:00',
|
||||
id: 5,
|
||||
content: 'eeeeeee',
|
||||
title: '555555'),
|
||||
]);
|
||||
if (_modelLists.isNotEmpty) {
|
||||
_headMonth = _modelLists[0].month;
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
onLoad: () async {},
|
||||
child: _modelLists.isEmpty
|
||||
? Container()
|
||||
: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
controller: _autoScrollController,
|
||||
itemBuilder: (context, index) {
|
||||
return AutoScrollTag(
|
||||
key: ValueKey(index),
|
||||
index: index,
|
||||
controller: _autoScrollController,
|
||||
child: AnnounceCard(
|
||||
modelList: _modelLists[index],
|
||||
index: index,
|
||||
),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (_, index) => SizedBox(),
|
||||
// Container(
|
||||
// padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||
// alignment: Alignment.centerLeft,
|
||||
// width: double.infinity,
|
||||
// height: 98.w,
|
||||
// child: _modelLists[index + 1]
|
||||
// .month
|
||||
// .text
|
||||
// .size(36.sp)
|
||||
// .black
|
||||
// .make(),
|
||||
// ),
|
||||
itemCount: _modelLists.length),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
PopupMenuButton _popupMenuButton() {
|
||||
return PopupMenuButton(
|
||||
child: Icon(
|
||||
CupertinoIcons.arrowtriangle_down_fill,
|
||||
size: 24.w,
|
||||
),
|
||||
itemBuilder: (context) {
|
||||
return List.generate(
|
||||
_modelLists.length,
|
||||
(index) => PopupMenuItem(
|
||||
child: Text(_modelLists[index].month),
|
||||
value: _modelLists[index].index,
|
||||
));
|
||||
},
|
||||
onSelected: (value) {
|
||||
_headMonth = _modelLists[value].month;
|
||||
print(value);
|
||||
_autoScrollController.scrollToIndex(value,
|
||||
preferPosition: AutoScrollPosition.end);
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
import 'package:aku_new_community/constants/api.dart';
|
||||
import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class ReplayView extends StatefulWidget {
|
||||
const ReplayView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ReplayViewState createState() => _ReplayViewState();
|
||||
}
|
||||
|
||||
class _ReplayViewState extends State<ReplayView> {
|
||||
EasyRefreshController _refreshController = EasyRefreshController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_refreshController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BeeListView(
|
||||
path: API.host,
|
||||
controller: _refreshController,
|
||||
convert: (json) {
|
||||
return [];
|
||||
},
|
||||
builder: (items) {
|
||||
return ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
return Container();
|
||||
},
|
||||
separatorBuilder: (_, __) => 20.w.heightBox,
|
||||
itemCount: items.length);
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
import 'package:aku_new_community/base/base_style.dart';
|
||||
import 'package:aku_new_community/constants/api.dart';
|
||||
import 'package:aku_new_community/models/message/reply_list_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class ReplyCard extends StatelessWidget {
|
||||
final ReplyListModel model;
|
||||
|
||||
const ReplyCard({Key? key, required this.model}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 48.w),
|
||||
child: Row(
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Image.network(
|
||||
API.image(model.img.url),
|
||||
width: 100.w,
|
||||
height: 100.w,
|
||||
),
|
||||
),
|
||||
24.w.widthBox,
|
||||
SizedBox(
|
||||
width: 350.w,
|
||||
child: Column(
|
||||
children: [
|
||||
model.title.text.size(26.sp).black.bold.make(),
|
||||
model.content.text
|
||||
.size(24.sp)
|
||||
.color(ktextSubColor)
|
||||
.maxLines(1)
|
||||
.ellipsis
|
||||
.make(),
|
||||
model.date.text.size(24.sp).color(ktextSubColor).make(),
|
||||
],
|
||||
),
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(9.w),
|
||||
child: Image.network(
|
||||
API.image(model.pic.url),
|
||||
width: 128.w,
|
||||
height: 128.w,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
import 'package:aku_new_community/base/base_style.dart';
|
||||
import 'package:aku_new_community/constants/api.dart';
|
||||
import 'package:aku_new_community/gen/assets.gen.dart';
|
||||
import 'package:aku_new_community/models/message/reply_list_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class thumbs_up_card extends StatelessWidget {
|
||||
final ReplyListModel model;
|
||||
|
||||
const thumbs_up_card({Key? key, required this.model}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 48.w),
|
||||
child: Row(
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Image.network(
|
||||
API.image(model.img.url),
|
||||
width: 100.w,
|
||||
height: 100.w,
|
||||
),
|
||||
),
|
||||
24.w.widthBox,
|
||||
SizedBox(
|
||||
width: 350.w,
|
||||
child: Column(
|
||||
children: [
|
||||
model.name.text.size(26.sp).black.bold.make(),
|
||||
Assets.icons.communityLikeIs
|
||||
.image(width: 28.w, height: 28.w, fit: BoxFit.contain),
|
||||
model.date.text.size(24.sp).color(ktextSubColor).make(),
|
||||
],
|
||||
),
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(9.w),
|
||||
child: Image.network(
|
||||
API.image(model.pic.url),
|
||||
width: 128.w,
|
||||
height: 128.w,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
import 'package:aku_new_community/constants/api.dart';
|
||||
import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class ThumbsUpView extends StatefulWidget {
|
||||
const ThumbsUpView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ThumbsUpViewState createState() => _ThumbsUpViewState();
|
||||
}
|
||||
|
||||
class _ThumbsUpViewState extends State<ThumbsUpView> {
|
||||
EasyRefreshController _refreshController = EasyRefreshController();
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_refreshController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BeeListView(
|
||||
path: API.host,
|
||||
controller: _refreshController,
|
||||
convert: (json) => [],
|
||||
builder: (items) {
|
||||
return ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
return Container();
|
||||
},
|
||||
separatorBuilder: (_, __) => 20.w.heightBox,
|
||||
itemCount: items.length);
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
import 'package:aku_new_community/base/base_style.dart';
|
||||
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class LoginPage extends StatefulWidget {
|
||||
const LoginPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_LoginPageState createState() => _LoginPageState();
|
||||
}
|
||||
|
||||
class _LoginPageState extends State<LoginPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BeeScaffold(
|
||||
body: Column(
|
||||
children: [
|
||||
'登录解锁更多功能'.text.size(36.sp).color(ktextPrimary).bold.make(),
|
||||
144.w.heightBox,
|
||||
Column(
|
||||
children: [
|
||||
'${'154793018'}'.text.size(36.sp).color(ktextPrimary).bold.make(),
|
||||
40.w.heightBox,
|
||||
MaterialButton(
|
||||
onPressed: () {},
|
||||
elevation: 0,
|
||||
height: 45.w,
|
||||
minWidth: 256.w,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(60.w)),
|
||||
child: '本机号码一键登录'.text.size(32.sp).black.bold.make(),
|
||||
)
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: ktextSubColor,
|
||||
),
|
||||
text: '注册/登记即代表同意',
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
//TODO:跳转隐私政策
|
||||
},
|
||||
child: '《小蜜蜂隐私政策及用户协议》'
|
||||
.text
|
||||
.size(24.sp)
|
||||
.color(Color(0xFF5096F1))
|
||||
.make(),
|
||||
)),
|
||||
])),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
import 'package:aku_new_community/base/base_style.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
class AllSelectButton extends StatelessWidget {
|
||||
final VoidCallback onPressed;
|
||||
final Color? backColor;
|
||||
final bool selected;
|
||||
final Widget? indent;
|
||||
|
||||
const AllSelectButton(
|
||||
{Key? key,
|
||||
required this.onPressed,
|
||||
this.backColor,
|
||||
required this.selected,
|
||||
this.indent})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedContainer(
|
||||
height: 40.w,
|
||||
width: 40.w,
|
||||
decoration: BoxDecoration(
|
||||
color: (backColor ?? kPrimaryColor).withOpacity(selected ? 1 : 0),
|
||||
border: Border.all(
|
||||
color: backColor != null
|
||||
? Color(0xFFBBBBBB)
|
||||
: (selected ? kPrimaryColor : Color(0xFF979797)),
|
||||
width: 3.w,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(20.w),
|
||||
),
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOutCubic,
|
||||
alignment: Alignment.center,
|
||||
child: AnimatedOpacity(
|
||||
duration: Duration(milliseconds: 500),
|
||||
curve: Curves.easeInOutCubic,
|
||||
opacity: selected ? 1 : 0,
|
||||
child: indent ??
|
||||
Icon(
|
||||
CupertinoIcons.checkmark,
|
||||
color: Colors.white,
|
||||
size: 28.w,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue