ui: Add a not-implemented popup
This commit is contained in:
parent
7111240abb
commit
9048f4abb8
26
lib/ui/helpers.dart
Normal file
26
lib/ui/helpers.dart
Normal 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()
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user