Merge branch 'krille/design-improvements' into 'master'

Krille/design improvements

See merge request ChristianPauly/fluffychat-flutter!81
This commit is contained in:
Christian Pauly 2020-06-24 07:42:28 +00:00
commit e2ec3ff15f
7 changed files with 160 additions and 165 deletions

View File

@ -1,5 +1,37 @@
PODS:
- DKImagePickerController/Core (4.2.2):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
- DKImagePickerController/ImageDataManager (4.2.2)
- DKImagePickerController/PhotoGallery (4.2.2):
- DKImagePickerController/Core
- DKPhotoGallery
- DKImagePickerController/Resource (4.2.2)
- DKPhotoGallery (0.0.14):
- DKPhotoGallery/Core (= 0.0.14)
- DKPhotoGallery/Model (= 0.0.14)
- DKPhotoGallery/Preview (= 0.0.14)
- DKPhotoGallery/Resource (= 0.0.14)
- SDWebImage
- SDWebImageFLPlugin
- DKPhotoGallery/Core (0.0.14):
- DKPhotoGallery/Model
- DKPhotoGallery/Preview
- SDWebImage
- SDWebImageFLPlugin
- DKPhotoGallery/Model (0.0.14):
- SDWebImage
- SDWebImageFLPlugin
- DKPhotoGallery/Preview (0.0.14):
- DKPhotoGallery/Model
- DKPhotoGallery/Resource
- SDWebImage
- SDWebImageFLPlugin
- DKPhotoGallery/Resource (0.0.14):
- SDWebImage
- SDWebImageFLPlugin
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Firebase/Core (6.27.0):
- Firebase/CoreOnly
@ -49,11 +81,14 @@ PODS:
- GoogleUtilities/Reachability (~> 6.5)
- GoogleUtilities/UserDefaults (~> 6.5)
- Protobuf (>= 3.9.2, ~> 3.9)
- FLAnimatedImage (1.0.12)
- Flutter (1.0.0)
- flutter_keyboard_visibility (0.7.0):
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_plugin_android_lifecycle (0.0.1):
- Flutter
- flutter_secure_storage (3.3.1):
- Flutter
- flutter_sound (0.0.1):
@ -112,6 +147,12 @@ PODS:
- Protobuf (3.12.0)
- receive_sharing_intent (0.0.1):
- Flutter
- SDWebImage (5.8.1):
- SDWebImage/Core (= 5.8.1)
- SDWebImage/Core (5.8.1)
- SDWebImageFLPlugin (0.4.0):
- FLAnimatedImage (>= 1.0.11)
- SDWebImage/Core (~> 5.6)
- share (0.5.2):
- Flutter
- sqflite (0.0.1):
@ -140,6 +181,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
@ -157,6 +199,8 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- DKImagePickerController
- DKPhotoGallery
- Firebase
- FirebaseAnalytics
- FirebaseCore
@ -164,6 +208,7 @@ SPEC REPOS:
- FirebaseInstallations
- FirebaseInstanceID
- FirebaseMessaging
- FLAnimatedImage
- FMDB
- GoogleAppMeasurement
- GoogleDataTransport
@ -173,6 +218,8 @@ SPEC REPOS:
- OLMKit
- PromisesObjC
- Protobuf
- SDWebImage
- SDWebImageFLPlugin
- SQLCipher
EXTERNAL SOURCES:
@ -186,6 +233,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_plugin_android_lifecycle:
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
flutter_sound:
@ -214,7 +263,9 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter/ios"
SPEC CHECKSUMS:
file_picker: 408623be2125b79a4539cf703be3d4b3abe5e245
DKImagePickerController: 4a3e7948a848c4348e600b3fe5ce41478835fa10
DKPhotoGallery: 0290d32343574f06eaa4c26f8f2f8a1035e916be
file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
Firebase: fc4cbf6f1592636431821ef9a3c557e4dfd9f268
firebase_messaging: cffb57ce40958c6204f03fb0c81713e4cd1e240c
FirebaseAnalytics: 0ea640473474f036cabbc2576e20c2d63671c92f
@ -223,9 +274,11 @@ SPEC CHECKSUMS:
FirebaseInstallations: 293f567159b6d66d1c990f13bb868066096c94ec
FirebaseInstanceID: 3b119bfe90e904851218159c9a4ecb847cc51d18
FirebaseMessaging: ad9e1a80ea64905e01a0ce1b3eb76a2944544151
FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_keyboard_visibility: 6195387fb6d8f46e5cd6dda4a4154e41f800f545
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec
flutter_sound: 0e8163ceac1e00eb6d894e2ae4641ba726a2c479
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
@ -233,7 +286,7 @@ SPEC CHECKSUMS:
GoogleDataTransport: 9a8a16f79feffc7f42096743de2a7c4815e84020
GoogleDataTransportCCTSupport: 489c1265d2c85b68187a83a911913d190012158d
GoogleUtilities: 39530bc0ad980530298e9c4af8549e991fd033b1
image_picker: e3eacd46b94694dde7cf2705955cece853aa1a8f
image_picker: 66aa71bc96850a90590a35d4c4a2907b0d823109
nanopb: c43f40fadfe79e8b8db116583945847910cbabc9
OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
@ -241,6 +294,8 @@ SPEC CHECKSUMS:
PromisesObjC: b48e0338dbbac2207e611750777895f7a5811b75
Protobuf: 2793fcd0622a00b546c60e7cbbcc493e043e9bb9
receive_sharing_intent: c0d87310754e74c0f9542947e7cbdf3a0335a3b1
SDWebImage: e3eae2eda88578db0685a0c88597fdadd9433f05
SDWebImageFLPlugin: 6c2295fb1242d44467c6c87dc5db6b0a13228fd8
share: bae0a282aab4483288913fc4dc0b935d4b491f2e
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
sqflite_sqlcipher: 45e72be2f26bde6ad196ff8b084123d8634ba921

View File

@ -43,15 +43,17 @@ class PresenceListItem extends StatelessWidget {
width: 80,
child: Column(
children: <Widget>[
SizedBox(height: 9),
SizedBox(height: 16),
Avatar(user.avatarUrl, user.calcDisplayname()),
Padding(
padding: const EdgeInsets.all(6.0),
padding: const EdgeInsets.only(left: 6.0, top: 6.0, right: 6.0),
child: Text(
user.calcDisplayname(),
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: Color(0xFF555555),
fontSize: 13,
fontWeight: presence?.presence?.statusMsg == null
? null
: FontWeight.bold,

View File

@ -7,6 +7,6 @@ extension StringColor on String {
number += codeUnitAt(i);
}
number = (number % 10) * 25.5;
return HSLColor.fromAHSL(1, number, 1, 0.35).toColor();
return HSLColor.fromAHSL(1, number, 1, 0.66).toColor();
}
}

View File

@ -345,9 +345,7 @@ class _ChatState extends State<_Chat> {
}
return Scaffold(
extendBodyBehindAppBar: true,
appBar: AppBar(
backgroundColor: Theme.of(context).appBarTheme.color.withOpacity(0.95),
leading: selectMode
? IconButton(
icon: Icon(Icons.close),
@ -587,7 +585,7 @@ class _ChatState extends State<_Chat> {
Theme.of(context).backgroundColor.withOpacity(0.8),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: selectMode
? <Widget>[
@ -638,80 +636,88 @@ class _ChatState extends State<_Chat> {
]
: <Widget>[
if (inputText.isEmpty)
PopupMenuButton<String>(
icon: Icon(Icons.add),
onSelected: (String choice) async {
if (choice == 'file') {
sendFileAction(context);
} else if (choice == 'image') {
sendImageAction(context);
}
if (choice == 'camera') {
openCameraAction(context);
}
if (choice == 'voice') {
voiceMessageAction(context);
}
},
itemBuilder: (BuildContext context) =>
<PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: 'file',
child: ListTile(
leading: CircleAvatar(
backgroundColor: Colors.green,
foregroundColor: Colors.white,
child: Icon(Icons.attachment),
),
title:
Text(L10n.of(context).sendFile),
contentPadding: EdgeInsets.all(0),
),
),
PopupMenuItem<String>(
value: 'image',
child: ListTile(
leading: CircleAvatar(
backgroundColor: Colors.blue,
foregroundColor: Colors.white,
child: Icon(Icons.image),
),
title:
Text(L10n.of(context).sendImage),
contentPadding: EdgeInsets.all(0),
),
),
if (!kIsWeb)
Container(
height: 56,
alignment: Alignment.center,
child: PopupMenuButton<String>(
icon: Icon(Icons.add),
onSelected: (String choice) async {
if (choice == 'file') {
sendFileAction(context);
} else if (choice == 'image') {
sendImageAction(context);
}
if (choice == 'camera') {
openCameraAction(context);
}
if (choice == 'voice') {
voiceMessageAction(context);
}
},
itemBuilder: (BuildContext context) =>
<PopupMenuEntry<String>>[
PopupMenuItem<String>(
value: 'camera',
value: 'file',
child: ListTile(
leading: CircleAvatar(
backgroundColor: Colors.purple,
backgroundColor: Colors.green,
foregroundColor: Colors.white,
child: Icon(Icons.camera_alt),
child: Icon(Icons.attachment),
),
title: Text(
L10n.of(context).openCamera),
title:
Text(L10n.of(context).sendFile),
contentPadding: EdgeInsets.all(0),
),
),
if (!kIsWeb)
PopupMenuItem<String>(
value: 'voice',
value: 'image',
child: ListTile(
leading: CircleAvatar(
backgroundColor: Colors.red,
backgroundColor: Colors.blue,
foregroundColor: Colors.white,
child: Icon(Icons.mic),
child: Icon(Icons.image),
),
title: Text(
L10n.of(context).voiceMessage),
L10n.of(context).sendImage),
contentPadding: EdgeInsets.all(0),
),
),
],
if (!kIsWeb)
PopupMenuItem<String>(
value: 'camera',
child: ListTile(
leading: CircleAvatar(
backgroundColor: Colors.purple,
foregroundColor: Colors.white,
child: Icon(Icons.camera_alt),
),
title: Text(
L10n.of(context).openCamera),
contentPadding: EdgeInsets.all(0),
),
),
if (!kIsWeb)
PopupMenuItem<String>(
value: 'voice',
child: ListTile(
leading: CircleAvatar(
backgroundColor: Colors.red,
foregroundColor: Colors.white,
child: Icon(Icons.mic),
),
title: Text(L10n.of(context)
.voiceMessage),
contentPadding: EdgeInsets.all(0),
),
),
],
),
),
EncryptionButton(room),
Container(
height: 56,
alignment: Alignment.center,
child: EncryptionButton(room),
),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
@ -733,6 +739,7 @@ class _ChatState extends State<_Chat> {
decoration: InputDecoration(
hintText:
L10n.of(context).writeAMessage,
hintMaxLines: 1,
border: InputBorder.none,
),
onChanged: (String text) {
@ -760,15 +767,23 @@ class _ChatState extends State<_Chat> {
),
),
if (!kIsWeb && inputText.isEmpty)
IconButton(
icon: Icon(Icons.mic),
onPressed: () =>
voiceMessageAction(context),
Container(
height: 56,
alignment: Alignment.center,
child: IconButton(
icon: Icon(Icons.mic),
onPressed: () =>
voiceMessageAction(context),
),
),
if (kIsWeb || inputText.isNotEmpty)
IconButton(
icon: Icon(Icons.send),
onPressed: () => send(),
Container(
height: 56,
alignment: Alignment.center,
child: IconButton(
icon: Icon(Icons.send),
onPressed: () => send(),
),
),
],
),

View File

@ -8,11 +8,8 @@ import 'package:fluffychat/components/list_items/presence_list_item.dart';
import 'package:fluffychat/components/list_items/public_room_list_item.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:receive_sharing_intent/receive_sharing_intent.dart';
import 'package:share/share.dart';
import '../components/theme_switcher.dart';
import '../components/adaptive_page_layout.dart';
import '../components/list_items/chat_list_item.dart';
import '../components/matrix.dart';
@ -289,7 +286,7 @@ class _ChatListState extends State<ChatList> {
),
),
appBar: AppBar(
elevation: _scrolledToTop ? 0 : null,
//elevation: _scrolledToTop ? 0 : null,
leading: selectMode != SelectMode.share
? null
: IconButton(
@ -297,60 +294,19 @@ class _ChatListState extends State<ChatList> {
onPressed: () =>
Matrix.of(context).shareContent = null,
),
automaticallyImplyLeading: false,
titleSpacing: 0,
title: selectMode == SelectMode.share
? Text(L10n.of(context).share)
: Container(
height: 42,
margin: EdgeInsets.symmetric(horizontal: 8),
child: Material(
elevation: 5,
borderRadius: BorderRadius.circular(7),
child: Padding(
padding: EdgeInsets.all(8),
child: Row(
children: [
Builder(
builder: (context) => IconButton(
padding: EdgeInsets.zero,
icon: Icon(Icons.menu),
onPressed: () =>
Scaffold.of(context).openDrawer(),
),
),
Expanded(
child: TextField(
autocorrect: false,
controller: searchController,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(9),
border: InputBorder.none,
hintText:
L10n.of(context).searchForAChat,
),
),
),
loadingPublicRooms
? Container(
alignment: Alignment.centerRight,
child: Container(
width: 20,
height: 20,
child:
CircularProgressIndicator(),
),
)
: IconButton(
padding: EdgeInsets.zero,
icon: Icon(Icons.account_circle),
onPressed: () =>
Navigator.of(context).push(
AppRoute.defaultRoute(
context,
SettingsView())),
),
],
: Padding(
padding: EdgeInsets.all(8),
child: Expanded(
child: TextField(
autocorrect: false,
controller: searchController,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(9),
border: InputBorder.none,
hintText: L10n.of(context).searchForAChat,
),
),
),
@ -360,39 +316,14 @@ class _ChatListState extends State<ChatList> {
(AdaptivePageLayout.columnMode(context) ||
selectMode == SelectMode.share)
? null
: SpeedDial(
: FloatingActionButton(
child: Icon(Icons.add),
overlayColor: blackWhiteColor(context),
foregroundColor: Colors.white,
backgroundColor: Theme.of(context).primaryColor,
children: [
SpeedDialChild(
child: Icon(Icons.people_outline),
foregroundColor: Colors.white,
backgroundColor: Colors.blue,
label: L10n.of(context).createNewGroup,
labelStyle: TextStyle(
fontSize: 18.0, color: Colors.black),
onTap: () => Navigator.of(context)
.pushAndRemoveUntil(
AppRoute.defaultRoute(
context, NewGroupView()),
(r) => r.isFirst),
),
SpeedDialChild(
child: Icon(Icons.person_add),
foregroundColor: Colors.white,
backgroundColor: Colors.green,
label: L10n.of(context).newPrivateChat,
labelStyle: TextStyle(
fontSize: 18.0, color: Colors.black),
onTap: () => Navigator.of(context)
.pushAndRemoveUntil(
AppRoute.defaultRoute(
context, NewPrivateChatView()),
(r) => r.isFirst),
),
],
onPressed: () => Navigator.of(context)
.pushAndRemoveUntil(
AppRoute.defaultRoute(
context, NewPrivateChatView()),
(r) => r.isFirst),
),
body: StreamBuilder(
stream: Matrix.of(context).client.onSync.stream,

View File

@ -260,13 +260,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
flutter_speed_dial:
dependency: "direct main"
description:
name: flutter_speed_dial
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.5"
flutter_svg:
dependency: transitive
description:

View File

@ -32,7 +32,6 @@ dependencies:
localstorage: ^3.0.1+4
bubble: ^1.1.9+1
memoryfilepicker: ^0.1.1
flutter_speed_dial: ^1.2.5
url_launcher: ^5.4.1
url_launcher_web: ^0.1.0
sqflite: ^1.2.0