add some wip texts and toasts to not implemented parts

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

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