More fixes and new version

This commit is contained in:
Christian Pauly 2020-01-03 11:57:00 +01:00
parent d838d3a474
commit 3a64d58d23
12 changed files with 31 additions and 20 deletions

View File

@ -30,7 +30,7 @@ class Avatar extends StatelessWidget {
src, src,
) )
: null, : null,
backgroundColor: Color(0xFFF8F8F8), backgroundColor: Theme.of(context).secondaryHeaderColor,
child: mxContent.mxc.isEmpty child: mxContent.mxc.isEmpty
? Text("@", style: TextStyle(color: Colors.blueGrey)) ? Text("@", style: TextStyle(color: Colors.blueGrey))
: null, : null,

View File

@ -31,7 +31,7 @@ class ContentBanner extends StatelessWidget {
); );
return Container( return Container(
height: 200, height: 200,
color: Color(0xFFF8F8F8), color: Theme.of(context).secondaryHeaderColor,
child: !loading child: !loading
? mxContent.mxc?.isNotEmpty ?? false ? mxContent.mxc?.isNotEmpty ?? false
? kIsWeb ? kIsWeb

View File

@ -50,7 +50,7 @@ class ChatListItem extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: room.highlightCount > 0 color: room.highlightCount > 0
? Colors.red ? Colors.red
: Color(0xFF5625BA), : Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
), ),
child: Center( child: Center(
@ -91,7 +91,7 @@ class ChatListItem extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: room.highlightCount > 0 color: room.highlightCount > 0
? Colors.red ? Colors.red
: Color(0xFF5625BA), : Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
), ),
child: Center( child: Center(

View File

@ -21,14 +21,16 @@ class Message extends StatelessWidget {
Client client = Matrix.of(context).client; Client client = Matrix.of(context).client;
final bool ownMessage = event.senderId == client.userID; final bool ownMessage = event.senderId == client.userID;
Alignment alignment = ownMessage ? Alignment.topRight : Alignment.topLeft; Alignment alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
Color color = Color(0xFFF8F8F8); Color color = Theme.of(context).secondaryHeaderColor;
BubbleNip nip = ownMessage ? BubbleNip.rightBottom : BubbleNip.leftBottom; BubbleNip nip = ownMessage ? BubbleNip.rightBottom : BubbleNip.leftBottom;
final Color textColor = ownMessage ? Colors.white : Colors.black; final Color textColor = ownMessage ? Colors.white : Colors.black;
MainAxisAlignment rowMainAxisAlignment = MainAxisAlignment rowMainAxisAlignment =
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start; ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
if (ownMessage) { if (ownMessage) {
color = event.status == -1 ? Colors.redAccent : Color(0xFF5625BA); color = event.status == -1
? Colors.redAccent
: Theme.of(context).primaryColor;
} }
List<PopupMenuEntry<String>> popupMenuList = []; List<PopupMenuEntry<String>> popupMenuList = [];
if (event.canRedact && !event.redacted && event.status > 1) { if (event.canRedact && !event.redacted && event.status > 1) {

View File

@ -97,7 +97,7 @@ class ParticipantListItem extends StatelessWidget {
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
margin: EdgeInsets.symmetric(horizontal: 8), margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFF8F8F8), color: Theme.of(context).secondaryHeaderColor,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
child: Center(child: Text(permissionBatch)), child: Center(child: Text(permissionBatch)),
@ -108,7 +108,7 @@ class ParticipantListItem extends StatelessWidget {
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
margin: EdgeInsets.symmetric(horizontal: 8), margin: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFF8F8F8), color: Theme.of(context).secondaryHeaderColor,
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
child: child:

View File

@ -12,11 +12,14 @@ class StateMessage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Padding( return Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Opacity(
opacity: 0.66,
child: Bubble( child: Bubble(
color: Color(0xFFF8F8F8), color: Colors.black,
elevation: 0, elevation: 0,
alignment: Alignment.center, alignment: Alignment.center,
child: MessageContent(event), child: MessageContent(event, textColor: Colors.white),
),
), ),
); );
} }

View File

@ -24,6 +24,7 @@ class App extends StatelessWidget {
brightness: Brightness.light, brightness: Brightness.light,
primaryColor: Color(0xFF5625BA), primaryColor: Color(0xFF5625BA),
backgroundColor: Colors.white, backgroundColor: Colors.white,
secondaryHeaderColor: Color(0xFFF2F2F2),
scaffoldBackgroundColor: Colors.white, scaffoldBackgroundColor: Colors.white,
dialogTheme: DialogTheme( dialogTheme: DialogTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(

View File

@ -122,7 +122,9 @@ class _ChatDetailsState extends State<ChatDetails> {
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container(height: 8, color: Color(0xFFF8F8F8)), child: Container(
height: 8,
color: Theme.of(context).secondaryHeaderColor),
), ),
SizedBox(width: 8), SizedBox(width: 8),
Text( Text(
@ -133,7 +135,9 @@ class _ChatDetailsState extends State<ChatDetails> {
), ),
SizedBox(width: 8), SizedBox(width: 8),
Expanded( Expanded(
child: Container(height: 8, color: Color(0xFFF8F8F8)), child: Container(
height: 8,
color: Theme.of(context).secondaryHeaderColor),
), ),
], ],
), ),

View File

@ -19,7 +19,8 @@ class ChatListView extends StatelessWidget {
firstScaffold: ChatList(), firstScaffold: ChatList(),
secondScaffold: Scaffold( secondScaffold: Scaffold(
body: Center( body: Center(
child: Icon(Icons.chat, size: 100, color: Color(0xFF5625BA)), child: Icon(Icons.chat,
size: 100, color: Theme.of(context).primaryColor),
), ),
), ),
); );
@ -119,7 +120,7 @@ class _ChatListState extends State<ChatList> {
), ),
floatingActionButton: SpeedDial( floatingActionButton: SpeedDial(
child: Icon(Icons.add), child: Icon(Icons.add),
backgroundColor: Color(0xFF5625BA), backgroundColor: Theme.of(context).primaryColor,
children: [ children: [
SpeedDialChild( SpeedDialChild(
child: Icon(Icons.people_outline), child: Icon(Icons.people_outline),

View File

@ -125,7 +125,7 @@ class _LoginPageState extends State<LoginPage> {
end: Alignment.topRight, end: Alignment.topRight,
colors: <Color>[ colors: <Color>[
Colors.blue, Colors.blue,
Color(0xFF5625BA), Theme.of(context).primaryColor,
], ],
), ),
), ),

View File

@ -32,7 +32,7 @@ class _SettingsState extends State<Settings> {
void logoutAction(BuildContext context) async { void logoutAction(BuildContext context) async {
await Navigator.of(context).pop(); await Navigator.of(context).pop();
MatrixState matrix = Matrix.of(context); MatrixState matrix = Matrix.of(context);
await matrix.tryRequestWithLoadingDialog(matrix.client.logout()); await matrix.tryRequestWithErrorToast(matrix.client.logout());
matrix.clean(); matrix.clean();
} }

View File

@ -11,7 +11,7 @@ description: Chat with your friends.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.1.3+4 version: 0.1.4+5
environment: environment:
sdk: ">=2.1.0 <3.0.0" sdk: ">=2.1.0 <3.0.0"