[NewGroupChatScreen] Refactor
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -52,15 +52,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow,
|
backgroundColor: StreamChatTheme.of(context).colorTheme.whiteSnow,
|
||||||
body: SafeArea(
|
appBar: AppBar(
|
||||||
child: NestedScrollView(
|
|
||||||
floatHeaderSlivers: true,
|
|
||||||
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
|
||||||
return <Widget>[
|
|
||||||
SliverAppBar(
|
|
||||||
brightness: Theme.of(context).brightness,
|
|
||||||
pinned: true,
|
|
||||||
forceElevated: true,
|
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
backgroundColor: StreamChatTheme.of(context).colorTheme.white,
|
backgroundColor: StreamChatTheme.of(context).colorTheme.white,
|
||||||
leading: const StreamBackButton(),
|
leading: const StreamBackButton(),
|
||||||
@@ -76,8 +68,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
if (_selectedUsers.isNotEmpty)
|
if (_selectedUsers.isNotEmpty)
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: StreamSvgIcon.arrow_right(
|
icon: StreamSvgIcon.arrow_right(
|
||||||
color:
|
color: StreamChatTheme.of(context).colorTheme.accentBlue,
|
||||||
StreamChatTheme.of(context).colorTheme.accentBlue,
|
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final updatedList = await Navigator.pushNamed(
|
final updatedList = await Navigator.pushNamed(
|
||||||
@@ -96,6 +87,10 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
body: NestedScrollView(
|
||||||
|
floatHeaderSlivers: true,
|
||||||
|
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
|
||||||
|
return <Widget>[
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: SearchTextField(
|
child: SearchTextField(
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
@@ -180,8 +175,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
child: Container(
|
child: Container(
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient:
|
gradient: StreamChatTheme.of(context).colorTheme.bgGradient,
|
||||||
StreamChatTheme.of(context).colorTheme.bgGradient,
|
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
@@ -283,7 +277,6 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user