add factory constructor

This commit is contained in:
Salvatore Giordano
2020-11-24 13:39:36 +01:00
parent 93c324ac56
commit 6b62eadaa4
22 changed files with 424 additions and 166 deletions
+1 -2
View File
@@ -44,8 +44,7 @@ class _AdvancedOptionsPageState extends State<AdvancedOptionsPage> {
),
),
leading: IconButton(
icon: StreamSvgIcon(
assetName: 'Icon_left.svg',
icon: StreamSvgIcon.left(
color: Colors.black,
),
onPressed: () {
+9 -8
View File
@@ -130,14 +130,15 @@ class ChipInputTextFieldState<T> extends State<ChipsInputTextField<T>> {
Align(
alignment: Alignment.bottomCenter,
child: IconButton(
icon: StreamSvgIcon(
assetName: _chips.isEmpty
? 'Icon_user.svg'
: 'Icon_User_add.svg',
color: Colors.black.withOpacity(0.5),
height: 24,
width: 24,
),
icon: _chips.isEmpty
? StreamSvgIcon.user(
color: Colors.black.withOpacity(0.5),
size: 24,
)
: StreamSvgIcon.userAdd(
color: Colors.black.withOpacity(0.5),
size: 24,
),
onPressed:
!_pauseItemAddition ? null : resumeItemAddition,
alignment: Alignment.topRight,
+1 -2
View File
@@ -196,8 +196,7 @@ class ChooseUserPage extends StatelessWidget {
);
},
leading: CircleAvatar(
child: StreamSvgIcon(
assetName: 'settings.svg',
child: StreamSvgIcon.settings(
color: Colors.black,
),
backgroundColor:
+1 -3
View File
@@ -105,9 +105,7 @@ class _GroupChatDetailsScreenState extends State<GroupChatDetailsScreen> {
StreamNeumorphicButton(
child: IconButton(
padding: const EdgeInsets.all(0),
icon: StreamSvgIcon(
assetName: 'Icon_check.svg',
),
icon: StreamSvgIcon.check(),
color: Color(0xFF006CFF),
onPressed: _isGroupNameEmpty
? null
+3 -6
View File
@@ -143,8 +143,7 @@ class ChannelListPage extends StatelessWidget {
),
),
ListTile(
leading: StreamSvgIcon(
assetName: 'Icon_pen-write.svg',
leading: StreamSvgIcon.penWrite(
color: Colors.black.withOpacity(.5),
),
onTap: () {
@@ -162,8 +161,7 @@ class ChannelListPage extends StatelessWidget {
),
),
ListTile(
leading: StreamSvgIcon(
assetName: 'Icon_contacts.svg',
leading: StreamSvgIcon.contacts(
color: Colors.black.withOpacity(.5),
),
onTap: () {
@@ -197,8 +195,7 @@ class ChannelListPage extends StatelessWidget {
),
);
},
leading: StreamSvgIcon(
assetName: 'Icon_user.svg',
leading: StreamSvgIcon.user(
color: Colors.black.withOpacity(.5),
),
title: Text(
+5 -10
View File
@@ -163,8 +163,7 @@ class _NewChatScreenState extends State<NewChatScreen> {
),
),
Positioned(
child: StreamSvgIcon(
assetName: 'Icon_close.svg',
child: StreamSvgIcon.close(
color: Colors.white,
),
),
@@ -194,11 +193,9 @@ class _NewChatScreenState extends State<NewChatScreen> {
children: [
StreamNeumorphicButton(
child: Center(
child: StreamSvgIcon(
assetName: 'Icon_contacts.svg',
child: StreamSvgIcon.contacts(
color: Color(0xFF006CFF),
height: 24,
width: 24,
size: 24,
),
),
),
@@ -292,10 +289,8 @@ class _NewChatScreenState extends State<NewChatScreen> {
children: [
Padding(
padding: const EdgeInsets.all(24),
child: StreamSvgIcon(
assetName: 'Icon_search.svg',
height: 96,
width: 96,
child: StreamSvgIcon.search(
size: 96,
color: Colors.grey,
),
),
+7 -14
View File
@@ -65,8 +65,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
actions: [
if (_selectedUsers.isNotEmpty)
IconButton(
icon: StreamSvgIcon(
assetName: 'Icon_right.svg',
icon: StreamSvgIcon.right(
color: Color(0xFF006CFF),
),
onPressed: () {
@@ -101,11 +100,9 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
child: TextField(
controller: _controller,
decoration: InputDecoration(
prefixIcon: StreamSvgIcon(
assetName: 'Icon_search.svg',
prefixIcon: StreamSvgIcon.search(
color: Colors.black,
height: 24,
width: 24,
size: 24,
),
hintText: 'Search',
hintStyle: TextStyle(
@@ -163,10 +160,8 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
),
child: Padding(
padding: const EdgeInsets.all(0.0),
child: StreamSvgIcon(
assetName: 'Icon_close.svg',
height: 24,
width: 24,
child: StreamSvgIcon.close(
size: 24,
),
),
),
@@ -262,10 +257,8 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
children: [
Padding(
padding: const EdgeInsets.all(24),
child: StreamSvgIcon(
assetName: 'Icon_search.svg',
height: 96,
width: 96,
child: StreamSvgIcon.search(
size: 96,
color: Colors.grey,
),
),
+1 -1
View File
@@ -1,6 +1,6 @@
name: example
description: A new Flutter project.
version: 1.0.69+71
version: 1.0.70+72
environment:
sdk: ">=2.2.2 <3.0.0"