picker box update

null_safety
小赖 4 years ago
parent fae4a1e9b9
commit 6ba9657e26

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

@ -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,
Future<File> camView(
BuildContext context, {
double maxHeight = 3000,
double maxWidth = 3000,
@required String title}) async {
@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