diff --git a/lib/app.dart b/lib/app.dart index 72ae457..944ccb5 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -79,20 +79,30 @@ class _AppState extends State { 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)) + ], + ); + } } diff --git a/lib/canvas/drawing_page.dart b/lib/canvas/drawing_page.dart index 23b036e..24d0c5b 100644 --- a/lib/canvas/drawing_page.dart +++ b/lib/canvas/drawing_page.dart @@ -54,13 +54,9 @@ class _DrawingPageState extends State { @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: [ ToolBar( diff --git a/lib/main.dart b/lib/main.dart index bafc0d3..391927f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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)), + )); } diff --git a/lib/pages/all_notes_page.dart b/lib/pages/all_notes_page.dart index 5b0ba79..079c0e7 100644 --- a/lib/pages/all_notes_page.dart +++ b/lib/pages/all_notes_page.dart @@ -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 { + 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 { 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 { ], ), Row( - children: const [Text('date modified..')], + children: const [ + SizedBox( + height: 18, + ) + ], ), _buildNoteTiles() ], diff --git a/lib/widgets/drawing_page_top_actions.dart b/lib/widgets/drawing_page_top_actions.dart index 2216f47..962f746 100644 --- a/lib/widgets/drawing_page_top_actions.dart +++ b/lib/widgets/drawing_page_top_actions.dart @@ -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 { 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 { 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 { 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 { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16)), items: [ - const PopupMenuItem( + PopupMenuItem( 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( + PopupMenuItem( 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( value: 0, @@ -115,12 +145,19 @@ class _DrawingPageTopActionsState extends State { ); }, ), - const PopupMenuItem( + PopupMenuItem( 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), + ); + }, ), ]); }, diff --git a/lib/widgets/wip_toast.dart b/lib/widgets/wip_toast.dart new file mode 100644 index 0000000..8ea884e --- /dev/null +++ b/lib/widgets/wip_toast.dart @@ -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))), + ], + ), + ); + } +}