mod: SlideDialog泛型, 删除toastOpacity设置的trailing
This commit is contained in:
@ -220,15 +220,6 @@ class _StyleSettingState extends State<StyleSetting> {
|
|||||||
},
|
},
|
||||||
title: Text('Toast不透明度', style: titleStyle),
|
title: Text('Toast不透明度', style: titleStyle),
|
||||||
subtitle: Text('自定义Toast不透明度', style: subTitleStyle),
|
subtitle: Text('自定义Toast不透明度', style: subTitleStyle),
|
||||||
trailing: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
|
||||||
child: Obx(
|
|
||||||
() => Text(
|
|
||||||
'${settingController.toastOpacity.value}',
|
|
||||||
style: Theme.of(context).textTheme.titleSmall,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
dense: false,
|
dense: false,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
// import 'package:pilipala/models/common/theme_type.dart';
|
// import 'package:pilipala/models/common/theme_type.dart';
|
||||||
|
|
||||||
class SlideDialog<T extends double> extends StatefulWidget {
|
class SlideDialog<T extends num> extends StatefulWidget {
|
||||||
final double value;
|
final T value;
|
||||||
final String title;
|
final String title;
|
||||||
final double min;
|
final double min;
|
||||||
final double max;
|
final double max;
|
||||||
@ -23,13 +23,13 @@ class SlideDialog<T extends double> extends StatefulWidget {
|
|||||||
_SlideDialogState<T> createState() => _SlideDialogState<T>();
|
_SlideDialogState<T> createState() => _SlideDialogState<T>();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SlideDialogState<T extends double> extends State<SlideDialog<T>> {
|
class _SlideDialogState<T extends num> extends State<SlideDialog<T>> {
|
||||||
late double _tempValue;
|
late double _tempValue;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_tempValue = widget.value;
|
_tempValue = widget.value.toDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -62,7 +62,7 @@ class _SlideDialogState<T extends double> extends State<SlideDialog<T>> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context, _tempValue),
|
onPressed: () => Navigator.pop(context, _tempValue as T),
|
||||||
child: const Text('确定'),
|
child: const Text('确定'),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user