add some wip texts and toasts to not implemented parts
This commit is contained in:
parent
3e46750669
commit
b095838399
34
lib/app.dart
34
lib/app.dart
@ -79,20 +79,30 @@ class _AppState extends State<App> {
|
||||
case View.all:
|
||||
return const AllNotesPage();
|
||||
case View.shared:
|
||||
return const Text(
|
||||
'shared notebooks WIP',
|
||||
style: TextStyle(color: Colors.white),
|
||||
);
|
||||
case View.recycle:
|
||||
return const Text(
|
||||
'recycle bin WIP',
|
||||
style: TextStyle(color: Colors.white),
|
||||
);
|
||||
case View.folders:
|
||||
return const Text(
|
||||
'Folders WIP',
|
||||
style: TextStyle(color: Colors.white),
|
||||
);
|
||||
return _renderWIP();
|
||||
}
|
||||
}
|
||||
|
||||
Widget _renderWIP() {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: const [
|
||||
Icon(Icons.warning_amber, color: Color(0xffe5e5e5), size: 56),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Text('Not Implemented', style: TextStyle(color: Color(0xffe5e5e5))),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Text('Work in progress!',
|
||||
style: TextStyle(
|
||||
color: Color(0xffe5e5e5),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16))
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -54,12 +54,8 @@ class _DrawingPageState extends State<DrawingPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.blueGrey,
|
||||
title: Text(widget.meta.name),
|
||||
actions: [
|
||||
DrawingPageTopActions(
|
||||
controller: controller, noteMetaData: widget.meta)
|
||||
appBar: AppBar(title: Text(widget.meta.name), actions: [
|
||||
DrawingPageTopActions(controller: controller, noteMetaData: widget.meta)
|
||||
]),
|
||||
body: Row(
|
||||
children: [
|
||||
|
@ -22,5 +22,8 @@ void main() async {
|
||||
}
|
||||
}
|
||||
|
||||
runApp(const MaterialApp(home: App()));
|
||||
runApp(MaterialApp(
|
||||
home: const App(),
|
||||
theme: ThemeData(appBarTheme: const AppBarTheme(color: Colors.blueGrey)),
|
||||
));
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../context/file_change_notifier.dart';
|
||||
import '../widgets/icon_material_button.dart';
|
||||
import '../widgets/note_tile.dart';
|
||||
import '../widgets/wip_toast.dart';
|
||||
|
||||
class AllNotesPage extends StatefulWidget {
|
||||
const AllNotesPage({Key? key}) : super(key: key);
|
||||
@ -13,6 +15,14 @@ class AllNotesPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AllNotesPageState extends State<AllNotesPage> {
|
||||
FToast fToast = FToast();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
fToast.init(context);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
@ -36,19 +46,36 @@ class _AllNotesPageState extends State<AllNotesPage> {
|
||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||
onPressed: () async {
|
||||
// todo implement pdf import
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
iconSize: 22,
|
||||
),
|
||||
IconMaterialButton(
|
||||
icon: const Icon(Icons.search),
|
||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
iconSize: 22,
|
||||
),
|
||||
IconMaterialButton(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
iconSize: 22,
|
||||
),
|
||||
const SizedBox(
|
||||
@ -57,7 +84,11 @@ class _AllNotesPageState extends State<AllNotesPage> {
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: const [Text('date modified..')],
|
||||
children: const [
|
||||
SizedBox(
|
||||
height: 18,
|
||||
)
|
||||
],
|
||||
),
|
||||
_buildNoteTiles()
|
||||
],
|
||||
|
@ -3,6 +3,7 @@ import 'dart:math';
|
||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'wip_toast.dart';
|
||||
|
||||
import '../canvas/document_types.dart';
|
||||
import '../canvas/paint_controller.dart';
|
||||
@ -31,6 +32,11 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||
onPressed: () {
|
||||
// todo implement
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
),
|
||||
IconMaterialButton(
|
||||
@ -38,6 +44,11 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||
onPressed: () {
|
||||
// todo implement
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
),
|
||||
IconMaterialButton(
|
||||
@ -45,6 +56,11 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||
onPressed: () {
|
||||
// todo implement
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
rotation: -pi / 4,
|
||||
),
|
||||
@ -60,19 +76,33 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16)),
|
||||
items: [
|
||||
const PopupMenuItem<int>(
|
||||
PopupMenuItem<int>(
|
||||
value: 0,
|
||||
child: Text(
|
||||
child: const Text(
|
||||
'Add to',
|
||||
style: TextStyle(color: Color(0xffe5e5e5)),
|
||||
),
|
||||
onTap: () {
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
),
|
||||
const PopupMenuItem<int>(
|
||||
PopupMenuItem<int>(
|
||||
value: 0,
|
||||
child: Text(
|
||||
child: const Text(
|
||||
'Tags',
|
||||
style: TextStyle(color: Color(0xffe5e5e5)),
|
||||
),
|
||||
onTap: () {
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
),
|
||||
PopupMenuItem<int>(
|
||||
value: 0,
|
||||
@ -115,12 +145,19 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
||||
);
|
||||
},
|
||||
),
|
||||
const PopupMenuItem<int>(
|
||||
PopupMenuItem<int>(
|
||||
value: 0,
|
||||
child: Text(
|
||||
child: const Text(
|
||||
'Print',
|
||||
style: TextStyle(color: Color(0xffe5e5e5)),
|
||||
),
|
||||
onTap: () {
|
||||
fToast.showToast(
|
||||
child: const WIPToast(),
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
toastDuration: const Duration(seconds: 2),
|
||||
);
|
||||
},
|
||||
),
|
||||
]);
|
||||
},
|
||||
|
29
lib/widgets/wip_toast.dart
Normal file
29
lib/widgets/wip_toast.dart
Normal file
@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WIPToast extends StatelessWidget {
|
||||
const WIPToast({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(25.0),
|
||||
color: const Color(0xff252525),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: const [
|
||||
Icon(
|
||||
Icons.warning_amber,
|
||||
color: Color(0xffe5e5e5),
|
||||
),
|
||||
SizedBox(
|
||||
width: 12.0,
|
||||
),
|
||||
Text('Not Implemented!', style: TextStyle(color: Color(0xffe5e5e5))),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user