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:
|
case View.all:
|
||||||
return const AllNotesPage();
|
return const AllNotesPage();
|
||||||
case View.shared:
|
case View.shared:
|
||||||
return const Text(
|
|
||||||
'shared notebooks WIP',
|
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
);
|
|
||||||
case View.recycle:
|
case View.recycle:
|
||||||
return const Text(
|
|
||||||
'recycle bin WIP',
|
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
);
|
|
||||||
case View.folders:
|
case View.folders:
|
||||||
return const Text(
|
return _renderWIP();
|
||||||
'Folders WIP',
|
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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,13 +54,9 @@ class _DrawingPageState extends State<DrawingPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(title: Text(widget.meta.name), actions: [
|
||||||
backgroundColor: Colors.blueGrey,
|
DrawingPageTopActions(controller: controller, noteMetaData: widget.meta)
|
||||||
title: Text(widget.meta.name),
|
]),
|
||||||
actions: [
|
|
||||||
DrawingPageTopActions(
|
|
||||||
controller: controller, noteMetaData: widget.meta)
|
|
||||||
]),
|
|
||||||
body: Row(
|
body: Row(
|
||||||
children: [
|
children: [
|
||||||
ToolBar(
|
ToolBar(
|
||||||
|
@ -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:flutter/material.dart';
|
||||||
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../context/file_change_notifier.dart';
|
import '../context/file_change_notifier.dart';
|
||||||
import '../widgets/icon_material_button.dart';
|
import '../widgets/icon_material_button.dart';
|
||||||
import '../widgets/note_tile.dart';
|
import '../widgets/note_tile.dart';
|
||||||
|
import '../widgets/wip_toast.dart';
|
||||||
|
|
||||||
class AllNotesPage extends StatefulWidget {
|
class AllNotesPage extends StatefulWidget {
|
||||||
const AllNotesPage({Key? key}) : super(key: key);
|
const AllNotesPage({Key? key}) : super(key: key);
|
||||||
@ -13,6 +15,14 @@ class AllNotesPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AllNotesPageState extends State<AllNotesPage> {
|
class _AllNotesPageState extends State<AllNotesPage> {
|
||||||
|
FToast fToast = FToast();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
fToast.init(context);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
@ -36,19 +46,36 @@ class _AllNotesPageState extends State<AllNotesPage> {
|
|||||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// todo implement pdf import
|
// todo implement pdf import
|
||||||
|
fToast.showToast(
|
||||||
|
child: const WIPToast(),
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
toastDuration: const Duration(seconds: 2),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
iconSize: 22,
|
iconSize: 22,
|
||||||
),
|
),
|
||||||
IconMaterialButton(
|
IconMaterialButton(
|
||||||
icon: const Icon(Icons.search),
|
icon: const Icon(Icons.search),
|
||||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
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,
|
iconSize: 22,
|
||||||
),
|
),
|
||||||
IconMaterialButton(
|
IconMaterialButton(
|
||||||
icon: const Icon(Icons.more_vert),
|
icon: const Icon(Icons.more_vert),
|
||||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
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,
|
iconSize: 22,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@ -57,7 +84,11 @@ class _AllNotesPageState extends State<AllNotesPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: const [Text('date modified..')],
|
children: const [
|
||||||
|
SizedBox(
|
||||||
|
height: 18,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
_buildNoteTiles()
|
_buildNoteTiles()
|
||||||
],
|
],
|
||||||
|
@ -3,6 +3,7 @@ import 'dart:math';
|
|||||||
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
|
import 'wip_toast.dart';
|
||||||
|
|
||||||
import '../canvas/document_types.dart';
|
import '../canvas/document_types.dart';
|
||||||
import '../canvas/paint_controller.dart';
|
import '../canvas/paint_controller.dart';
|
||||||
@ -31,6 +32,11 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
|||||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// todo implement
|
// todo implement
|
||||||
|
fToast.showToast(
|
||||||
|
child: const WIPToast(),
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
toastDuration: const Duration(seconds: 2),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconMaterialButton(
|
IconMaterialButton(
|
||||||
@ -38,6 +44,11 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
|||||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// todo implement
|
// todo implement
|
||||||
|
fToast.showToast(
|
||||||
|
child: const WIPToast(),
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
toastDuration: const Duration(seconds: 2),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
IconMaterialButton(
|
IconMaterialButton(
|
||||||
@ -45,6 +56,11 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
|||||||
color: const Color.fromRGBO(255, 255, 255, .85),
|
color: const Color.fromRGBO(255, 255, 255, .85),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// todo implement
|
// todo implement
|
||||||
|
fToast.showToast(
|
||||||
|
child: const WIPToast(),
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
toastDuration: const Duration(seconds: 2),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
rotation: -pi / 4,
|
rotation: -pi / 4,
|
||||||
),
|
),
|
||||||
@ -60,19 +76,33 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
|||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(16)),
|
borderRadius: BorderRadius.circular(16)),
|
||||||
items: [
|
items: [
|
||||||
const PopupMenuItem<int>(
|
PopupMenuItem<int>(
|
||||||
value: 0,
|
value: 0,
|
||||||
child: Text(
|
child: const Text(
|
||||||
'Add to',
|
'Add to',
|
||||||
style: TextStyle(color: Color(0xffe5e5e5)),
|
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,
|
value: 0,
|
||||||
child: Text(
|
child: const Text(
|
||||||
'Tags',
|
'Tags',
|
||||||
style: TextStyle(color: Color(0xffe5e5e5)),
|
style: TextStyle(color: Color(0xffe5e5e5)),
|
||||||
),
|
),
|
||||||
|
onTap: () {
|
||||||
|
fToast.showToast(
|
||||||
|
child: const WIPToast(),
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
toastDuration: const Duration(seconds: 2),
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
PopupMenuItem<int>(
|
PopupMenuItem<int>(
|
||||||
value: 0,
|
value: 0,
|
||||||
@ -115,12 +145,19 @@ class _DrawingPageTopActionsState extends State<DrawingPageTopActions> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const PopupMenuItem<int>(
|
PopupMenuItem<int>(
|
||||||
value: 0,
|
value: 0,
|
||||||
child: Text(
|
child: const Text(
|
||||||
'Print',
|
'Print',
|
||||||
style: TextStyle(color: Color(0xffe5e5e5)),
|
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