feat: mobile setting page, trash page and recent file UI with mock data (#3734)

This commit is contained in:
Yijing Huang
2023-10-25 06:29:50 -07:00
committed by GitHub
parent d34eec1d99
commit ad21a61ffb
50 changed files with 1475 additions and 461 deletions

View File

@ -0,0 +1,54 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
Future<T?> showFlowyMobileBottomSheet<T>(
BuildContext context, {
required String title,
required Widget Function(BuildContext) builder,
}) async {
return showModalBottomSheet(
context: context,
builder: (context) => Padding(
padding: const EdgeInsets.fromLTRB(16, 16, 16, 32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_BottomSheetTitle(title),
const SizedBox(
height: 16,
),
builder(context),
],
),
),
);
}
class _BottomSheetTitle extends StatelessWidget {
const _BottomSheetTitle(this.title);
final String title;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
title,
style: theme.textTheme.labelSmall,
),
IconButton(
icon: Icon(
Icons.close,
color: theme.hintColor,
),
onPressed: () {
context.pop();
},
)
],
);
}
}