add factory constructor
This commit is contained in:
@@ -44,8 +44,7 @@ class _AdvancedOptionsPageState extends State<AdvancedOptionsPage> {
|
||||
),
|
||||
),
|
||||
leading: IconButton(
|
||||
icon: StreamSvgIcon(
|
||||
assetName: 'Icon_left.svg',
|
||||
icon: StreamSvgIcon.left(
|
||||
color: Colors.black,
|
||||
),
|
||||
onPressed: () {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -196,8 +196,7 @@ class ChooseUserPage extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
leading: CircleAvatar(
|
||||
child: StreamSvgIcon(
|
||||
assetName: 'settings.svg',
|
||||
child: StreamSvgIcon.settings(
|
||||
color: Colors.black,
|
||||
),
|
||||
backgroundColor:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -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,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"
|
||||
|
||||
Reference in New Issue
Block a user