mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Added image picker
This commit is contained in:
@ -4,6 +4,7 @@ import 'package:comunic/lists/conversation_messages_list.dart';
|
||||
import 'package:comunic/lists/users_list.dart';
|
||||
import 'package:comunic/models/new_conversation_message.dart';
|
||||
import 'package:comunic/ui/tiles/conversation_message_tile.dart';
|
||||
import 'package:comunic/utils/files_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/list_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
@ -82,6 +83,11 @@ class _ConversationScreenState extends State<ConversationScreen> {
|
||||
});
|
||||
}
|
||||
|
||||
/// Pick and send an image
|
||||
Future<void> _sendImage(BuildContext context) async {
|
||||
final image = await pickImage(context);
|
||||
}
|
||||
|
||||
/// Send a new message
|
||||
Future<void> _submitMessage(BuildContext context, String content) async {
|
||||
//Send the message
|
||||
@ -141,15 +147,15 @@ class _ConversationScreenState extends State<ConversationScreen> {
|
||||
child: new Row(
|
||||
children: <Widget>[
|
||||
// Image area
|
||||
/*new Container(
|
||||
new Container(
|
||||
margin: new EdgeInsets.symmetric(horizontal: 4.0),
|
||||
child: new IconButton(
|
||||
icon: new Icon(
|
||||
Icons.photo_camera,
|
||||
color: Theme.of(context).accentColor,
|
||||
),
|
||||
onPressed: () async {}),
|
||||
),*/
|
||||
onPressed: () => _sendImage(context)),
|
||||
),
|
||||
|
||||
// Message area
|
||||
new Flexible(
|
||||
|
Reference in New Issue
Block a user