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,
)
: null,
backgroundColor: Color(0xFFF8F8F8),
backgroundColor: Theme.of(context).secondaryHeaderColor,
child: mxContent.mxc.isEmpty
? Text("@", style: TextStyle(color: Colors.blueGrey))
: null,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -122,7 +122,9 @@ class _ChatDetailsState extends State<ChatDetails> {
Row(
children: <Widget>[
Expanded(
child: Container(height: 8, color: Color(0xFFF8F8F8)),
child: Container(
height: 8,
color: Theme.of(context).secondaryHeaderColor),
),
SizedBox(width: 8),
Text(
@ -133,7 +135,9 @@ class _ChatDetailsState extends State<ChatDetails> {
),
SizedBox(width: 8),
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(),
secondScaffold: Scaffold(
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(
child: Icon(Icons.add),
backgroundColor: Color(0xFF5625BA),
backgroundColor: Theme.of(context).primaryColor,
children: [
SpeedDialChild(
child: Icon(Icons.people_outline),

View File

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

View File

@ -32,7 +32,7 @@ class _SettingsState extends State<Settings> {
void logoutAction(BuildContext context) async {
await Navigator.of(context).pop();
MatrixState matrix = Matrix.of(context);
await matrix.tryRequestWithLoadingDialog(matrix.client.logout());
await matrix.tryRequestWithErrorToast(matrix.client.logout());
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.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.1.3+4
version: 0.1.4+5
environment:
sdk: ">=2.1.0 <3.0.0"