add some wip texts and toasts to not implemented parts

This commit is contained in:
lukas-heiligenbrunner 2022-11-04 00:36:06 +01:00
parent 3e46750669
commit b095838399
6 changed files with 135 additions and 29 deletions

View File

@ -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))
],
);
}
}
}

View File

@ -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: [

View File

@ -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)),
));
}

View File

@ -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()
],

View File

@ -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),
);
},
),
]);
},

View 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))),
],
),
);
}
}