瀏覽代碼

1.修复出生日期月日不随年变化的问题

tags/0.0.14+3
“yanghuaxuan” 3 年之前
父節點
當前提交
400a089e99
共有 2 個文件被更改,包括 9 次插入12 次删除
  1. +2
    -2
      example/android/app/build.gradle
  2. +7
    -10
      lib/widgets/others/action_date_alert/action_date_alert.dart

+ 2
- 2
example/android/app/build.gradle 查看文件

@@ -53,8 +53,8 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//选择要添加的对应cpu类型的.so库。
//abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
// abiFilters 'armeabi-v7a','x86_64'
abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
//abiFilters 'armeabi-v7a','x86_64'
}
}



+ 7
- 10
lib/widgets/others/action_date_alert/action_date_alert.dart 查看文件

@@ -9,9 +9,7 @@ class ActionDateAlert extends StatefulWidget {
final TextStyle selectedStyle;
final String maxTimeNew;

const ActionDateAlert({Key key, this.title, this.normalStyle, this.selectedStyle,this.maxTimeNew}) : super(key: key);


const ActionDateAlert({Key key, this.title, this.normalStyle, this.selectedStyle, this.maxTimeNew}) : super(key: key);

@override
State<StatefulWidget> createState() => _ActionDateAlert();
@@ -34,9 +32,7 @@ class _ActionDateAlert extends State<ActionDateAlert> {
width: double.infinity,
height: 250,
margin: EdgeInsets.all(0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10))),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10))),
child: Column(
children: <Widget>[
widget.title == null || widget.title == ''
@@ -87,14 +83,15 @@ class _ActionDateAlert extends State<ActionDateAlert> {

Widget _createContent(BuildContext context) {
DateTime maxTime;
if(!EmptyUtil.isEmpty(widget.maxTimeNew) && widget.maxTimeNew=="max"){
maxTime=DateTime.now();
}else{
maxTime=DateTime.parse("2100-12-31 23:59:59");
if (!EmptyUtil.isEmpty(widget.maxTimeNew) && widget.maxTimeNew == "max") {
maxTime = DateTime.now();
} else {
maxTime = DateTime.parse("2100-12-31 23:59:59");
}
return DatePickerWidget(
maxDateTime: maxTime,
initialDateTime: _dateTime,
onMonthChangeStartWithFirstDate: true,
onChange: (dataTime, list) {
_dateTime = dataTime;
},


Loading…
取消
儲存