2022-03-01 16:05:45 +08:00
|
|
|
import 'package:app_flowy/workspace/presentation/home/home_stack.dart';
|
2021-12-07 23:01:23 +05:30
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2021-10-12 16:58:05 +08:00
|
|
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
2021-06-19 23:41:19 +08:00
|
|
|
import 'package:flutter/material.dart';
|
2022-02-28 22:38:53 +08:00
|
|
|
|
2021-12-07 23:01:23 +05:30
|
|
|
import 'package:app_flowy/generated/locale_keys.g.dart';
|
2022-08-09 10:35:27 +08:00
|
|
|
import 'package:app_flowy/startup/plugin/plugin.dart';
|
2021-06-19 23:41:19 +08:00
|
|
|
|
2022-03-01 10:25:21 +08:00
|
|
|
class BlankPluginBuilder extends PluginBuilder {
|
2022-02-28 22:38:53 +08:00
|
|
|
@override
|
|
|
|
Plugin build(dynamic data) {
|
|
|
|
return BlankPagePlugin(pluginType: pluginType);
|
|
|
|
}
|
2021-10-10 15:58:57 +08:00
|
|
|
|
|
|
|
@override
|
2022-03-01 16:05:45 +08:00
|
|
|
String get menuName => "Blank";
|
2021-10-10 15:58:57 +08:00
|
|
|
|
|
|
|
@override
|
2022-08-18 19:32:08 +08:00
|
|
|
PluginType get pluginType => PluginType.blank;
|
2022-02-28 22:38:53 +08:00
|
|
|
}
|
|
|
|
|
2022-03-01 11:22:39 +08:00
|
|
|
class BlankPluginConfig implements PluginConfig {
|
|
|
|
@override
|
|
|
|
bool get creatable => false;
|
|
|
|
}
|
|
|
|
|
2022-03-01 16:05:45 +08:00
|
|
|
class BlankPagePlugin extends Plugin {
|
2022-03-01 10:25:21 +08:00
|
|
|
final PluginType _pluginType;
|
2022-02-28 22:38:53 +08:00
|
|
|
BlankPagePlugin({
|
2022-03-01 10:25:21 +08:00
|
|
|
required PluginType pluginType,
|
|
|
|
}) : _pluginType = pluginType;
|
2021-11-09 23:13:04 +08:00
|
|
|
|
2021-10-10 15:58:57 +08:00
|
|
|
@override
|
2022-03-02 11:38:22 +08:00
|
|
|
PluginDisplay get display => BlankPagePluginDisplay();
|
2021-06-19 23:41:19 +08:00
|
|
|
|
|
|
|
@override
|
2022-03-02 11:38:22 +08:00
|
|
|
PluginId get id => "BlankStack";
|
2021-10-10 17:01:30 +08:00
|
|
|
|
2021-10-28 21:55:22 +08:00
|
|
|
@override
|
2022-03-02 11:38:22 +08:00
|
|
|
PluginType get ty => _pluginType;
|
2022-02-28 22:38:53 +08:00
|
|
|
}
|
|
|
|
|
2022-03-20 17:17:06 +08:00
|
|
|
class BlankPagePluginDisplay extends PluginDisplay with NavigationItem {
|
2022-02-28 22:38:53 +08:00
|
|
|
@override
|
2022-08-09 10:35:27 +08:00
|
|
|
Widget get leftBarItem =>
|
|
|
|
FlowyText.medium(LocaleKeys.blankPageTitle.tr(), fontSize: 12);
|
2022-02-28 22:38:53 +08:00
|
|
|
|
|
|
|
@override
|
2022-03-04 08:22:49 +08:00
|
|
|
Widget buildWidget() => const BlankPage();
|
2022-02-28 22:38:53 +08:00
|
|
|
|
|
|
|
@override
|
|
|
|
List<NavigationItem> get navigationItems => [this];
|
2021-06-19 23:41:19 +08:00
|
|
|
}
|
|
|
|
|
2022-03-04 08:22:49 +08:00
|
|
|
class BlankPage extends StatefulWidget {
|
|
|
|
const BlankPage({Key? key}) : super(key: key);
|
2021-06-19 23:41:19 +08:00
|
|
|
|
|
|
|
@override
|
2022-03-04 08:22:49 +08:00
|
|
|
State<BlankPage> createState() => _BlankPageState();
|
2021-06-19 23:41:19 +08:00
|
|
|
}
|
|
|
|
|
2022-03-04 08:22:49 +08:00
|
|
|
class _BlankPageState extends State<BlankPage> {
|
2021-06-19 23:41:19 +08:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2021-07-27 23:10:39 +08:00
|
|
|
return SizedBox.expand(
|
|
|
|
child: Container(
|
|
|
|
color: Theme.of(context).colorScheme.surface,
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(10),
|
|
|
|
child: Container(),
|
2021-06-19 23:41:19 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|