ui: Add a not-implemented popup

This commit is contained in:
PapaTutuWawa 2021-12-23 17:31:44 +01:00
parent 7111240abb
commit 9048f4abb8
2 changed files with 28 additions and 1 deletions

26
lib/ui/helpers.dart Normal file
View File

@ -0,0 +1,26 @@
import 'package:flutter/material.dart';
Future<void> showNotImplementedDialog(String feature, BuildContext context) async {
return showDialog<void>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
title: Text("Not Implemented"),
content: SingleChildScrollView(
child: ListBody(
children: [
Text("The $feature feature is not yet implemented.")
]
)
),
actions: [
TextButton(
child: Text("Okay"),
onPressed: () => Navigator.of(context).pop()
)
]
);
}
);
}

View File

@ -5,6 +5,7 @@ import 'package:moxxyv2/ui/pages/conversation.dart';
import 'package:moxxyv2/models/conversation.dart';
import 'package:moxxyv2/redux/state.dart';
import 'package:moxxyv2/ui/constants.dart';
import "package:moxxyv2/ui/helpers.dart";
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:flutter_redux/flutter_redux.dart';
@ -75,7 +76,7 @@ class ConversationsPage extends StatelessWidget {
children: [
SpeedDialChild(
child: Icon(Icons.group),
onTap: () => print("OK"),
onTap: () => showNotImplementedDialog("groupchat", buildContext),
backgroundColor: BUBBLE_COLOR_SENT,
// TODO: Theme dependent?
foregroundColor: Colors.white,