picker box update

null_safety
小赖 4 years ago
parent fae4a1e9b9
commit 6ba9657e26

@ -48,27 +48,22 @@ class ASPickerBox extends StatelessWidget {
children: [
SizedBox(
height: 48.w,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_buildButton(
title: '取消',
onPressed: () {
Navigator.pop(context);
}),
Expanded(
child: Center(
child: Text(
title ?? '',
style: TextStyle(
color: kTextColor,
fontSize: 16.sp,
),
),
),
child: NavigationToolbar(
leading: _buildButton(
title: '取消',
onPressed: () => Navigator.pop(context),
),
middle: Text(
title ?? '',
style: TextStyle(
color: kTextColor,
fontSize: 16.sp,
),
_buildButton(title: confirmString, onPressed: onPressed),
],
),
trailing: _buildButton(
title: confirmString,
onPressed: onPressed,
),
),
),
ASDivider(),

@ -15,10 +15,12 @@ Future<File> camFile({double maxHeight = 3000, double maxWidth = 3000}) async {
return File(pickedFile.path);
}
Future<File> camView(BuildContext context,
{double maxHeight = 3000,
double maxWidth = 3000,
@required String title}) async {
Future<File> camView(
BuildContext context, {
double maxHeight = 3000,
double maxWidth = 3000,
@required String title,
}) async {
File file = await camFile(maxHeight: maxHeight, maxWidth: maxWidth);
if (file == null) return null;
return await Navigator.push(context, PageRouteBuilder(

Loading…
Cancel
Save