logo updates and other changes

This commit is contained in:
Muhammad Hamza
2021-10-15 11:43:40 +05:00
parent c464724bc8
commit 67df1c2b7b
5 changed files with 106 additions and 94 deletions
@@ -217,7 +217,7 @@ class _AddGroupViewState extends State<AddGroupView> {
leading: const CircleAvatar(
backgroundImage: AssetImage('assets/dp.png'),
),
title: Text(_contactsList[index].name),
title: Text(_contactsList[index].name!),
onTap: () {
setState(() {
_members.add(_contactsList[index].name);
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:simplex_chat/constants.dart';
@@ -18,65 +19,19 @@ class MyDrawer extends StatelessWidget {
return Column(
children: [
const SizedBox(height: 30.0),
Image.asset(
'assets/simpleX.png',
height: 85.0,
SvgPicture.asset(
'assets/logo.svg',
height: 55.0,
),
const Divider(height: 50.0),
const Divider(height: 30.0),
ListTile(
tileColor: _drawerProviders.currentIndex == 1
? kPrimaryColor
: Colors.transparent,
leading: Icon(
Icons.chat,
color: _drawerProviders.currentIndex == 1
? Colors.white
: Colors.grey,
),
title: Text(
'Conversations',
style: TextStyle(
color: _drawerProviders.currentIndex == 1
? Colors.white
: Colors.black,
),
),
onTap: () {
_drawerProviders.currentIndex = 1;
Navigator.pop(context);
},
),
ListTile(
tileColor: _drawerProviders.currentIndex == 2
? kPrimaryColor
: Colors.transparent,
leading: Icon(
Icons.insert_invitation,
color: _drawerProviders.currentIndex == 2
? Colors.white
: Colors.grey,
),
title: Text(
'Invitations',
style: TextStyle(
color: _drawerProviders.currentIndex == 2
? Colors.white
: Colors.black,
),
),
leading: const Icon(Icons.insert_invitation),
title: const Text('Invitations'),
onTap: () {
_drawerProviders.currentIndex = 2;
Navigator.pop(context);
},
),
ListTile(
leading: const Icon(
Icons.settings,
color: Colors.grey,
),
title: const Text('Settings'),
onTap: () {},
),
const Spacer(),
ListTile(
leading: const Icon(Icons.refresh),
@@ -70,49 +70,99 @@ class _HomeViewState extends State<HomeView> {
},
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.arrow_back),
child: Icon(Icons.arrow_back, color: kPrimaryColor),
),
),
)
: Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
InkWell(
onTap: () {
Scaffold.of(context).openDrawer();
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset('assets/menu.svg'),
),
),
const Spacer(),
Column(
: _drawerProviders.currentIndex == 2
? Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text('Hi! $_displayName',
style: kSmallHeadingStyle),
const Text('Good day!'),
InkWell(
onTap: () {
_drawerProviders.currentIndex = 1;
},
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(Icons.arrow_back,
color: kPrimaryColor)),
),
const Spacer(),
InkWell(
onTap: () {},
child: const Padding(
padding: EdgeInsets.all(8.0),
child: Icon(
Icons.bug_report,
color: Colors.grey,
),
)),
const SizedBox(width: 10.0),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text('Hi! $_displayName',
style: kSmallHeadingStyle),
const Text('Good day!'),
],
),
const SizedBox(width: 10.0),
GestureDetector(
onTap: () {
_drawerProviders.currentIndex = 0;
},
child: CircleAvatar(
backgroundImage: _photo!.isEmpty
? const AssetImage('assets/dp.png')
as ImageProvider
: FileImage(File(_photo!)),
),
)
],
),
const SizedBox(width: 10.0),
GestureDetector(
onTap: () {
_drawerProviders.currentIndex = 0;
},
child: CircleAvatar(
backgroundImage: _photo!.isEmpty
? const AssetImage('assets/dp.png')
as ImageProvider
: FileImage(File(_photo!)),
),
)
],
),
),
)
: Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
InkWell(
onTap: () {
Scaffold.of(context).openDrawer();
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: SvgPicture.asset('assets/menu.svg'),
),
),
const Spacer(),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text('Hi! $_displayName',
style: kSmallHeadingStyle),
const Text('Good day!'),
],
),
const SizedBox(width: 10.0),
GestureDetector(
onTap: () {
_drawerProviders.currentIndex = 0;
},
child: CircleAvatar(
backgroundImage: _photo!.isEmpty
? const AssetImage('assets/dp.png')
as ImageProvider
: FileImage(File(_photo!)),
),
)
],
),
),
],
);
}),
@@ -83,7 +83,10 @@ class ScanInvitationView extends StatelessWidget {
CustomButton(
width: 200,
height: 40,
onPressed: () => Navigator.pop(context),
onPressed: () {
int _count = 0;
Navigator.popUntil(context, (route) => _count++ >= 2);
},
color: kPrimaryColor,
child: const Text(
'Confirm',
@@ -94,7 +97,10 @@ class ScanInvitationView extends StatelessWidget {
CustomButton(
width: 200,
height: 40,
onPressed: () => Navigator.pop(context),
onPressed: () {
int _count = 0;
Navigator.popUntil(context, (route) => _count++ >= 2);
},
color: kSecondaryColor,
child: const Text(
'Ignore',
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:progress_indicators/progress_indicators.dart';
import 'package:simplex_chat/animations/entrance_fader.dart';
import 'package:simplex_chat/app_routes.dart';
@@ -38,9 +39,9 @@ class _SplashScreenState extends State<SplashScreen> {
EntranceFader(
duration: const Duration(seconds: 1),
offset: const Offset(0, 15),
child: Image.asset(
'assets/simpleX.png',
height: 150,
child: SvgPicture.asset(
'assets/logo.svg',
height: 85,
),
),
EntranceFader(