Ver código fonte

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

tags/0.0.14+3
“yanghuaxuan” 3 anos atrás
pai
commit
400a089e99
2 arquivos alterados com 9 adições e 12 exclusões
  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 Ver arquivo

@@ -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 Ver arquivo

@@ -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;
},


Carregando…
Cancelar
Salvar