Skip to content

Commit

Permalink
fix: bottom overflow rendering issue (#3221)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akashsri3bi authored Oct 27, 2022
1 parent 510104d commit e06fdf1
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 60 deletions.
1 change: 1 addition & 0 deletions packages/smooth_app/lib/pages/onboarding/welcome_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class WelcomePage extends StatelessWidget {
return SmoothScaffold(
backgroundColor: backgroundColor,
brightness: Brightness.dark,
resizeToAvoidBottomInset: false,
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down
122 changes: 62 additions & 60 deletions packages/smooth_app/lib/pages/product/common/product_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,71 +192,73 @@ class _ProductListPageState extends State<ProductListPage>
)
],
),
body: products.isEmpty
? GestureDetector(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SvgPicture.asset(
'assets/misc/empty-list.svg',
height: MediaQuery.of(context).size.height * .4,
package: AppHelper.APP_PACKAGE,
),
Text(
appLocalizations.product_list_empty_title,
style: themeData.textTheme.headlineLarge
?.apply(color: colorScheme.onBackground),
),
Padding(
padding: const EdgeInsets.all(VERY_LARGE_SPACE),
child: Text(
appLocalizations.product_list_empty_message,
textAlign: TextAlign.center,
style: themeData.textTheme.bodyText2?.apply(
color: colorScheme.onBackground,
),
body: SingleChildScrollView(
child: products.isEmpty
? GestureDetector(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SvgPicture.asset(
'assets/misc/empty-list.svg',
height: MediaQuery.of(context).size.height * .4,
package: AppHelper.APP_PACKAGE,
),
)
],
),
),
onTap: () {
InheritedDataManager.of(context).resetShowSearchCard(true);
},
)
: WillPopScope(
onWillPop: _handleUserBacktap,
child: RefreshIndicator(
//if it is in selectmode then refresh indicator is not shown
notificationPredicate:
_selectionMode ? (_) => false : (_) => true,
onRefresh: () async => _refreshListProducts(
products,
localDatabase,
appLocalizations,
Text(
appLocalizations.product_list_empty_title,
style: themeData.textTheme.headlineLarge
?.apply(color: colorScheme.onBackground),
),
Padding(
padding: const EdgeInsets.all(VERY_LARGE_SPACE),
child: Text(
appLocalizations.product_list_empty_message,
textAlign: TextAlign.center,
style: themeData.textTheme.bodyText2?.apply(
color: colorScheme.onBackground,
),
),
)
],
),
),
child: Consumer<UpToDateProductProvider>(
builder: (
_,
final UpToDateProductProvider provider,
__,
) =>
ListView.builder(
itemCount: products.length,
itemBuilder: (BuildContext context, int index) {
return _buildItem(
dismissible,
products,
index,
localDatabase,
appLocalizations,
);
},
onTap: () {
InheritedDataManager.of(context).resetShowSearchCard(true);
},
)
: WillPopScope(
onWillPop: _handleUserBacktap,
child: RefreshIndicator(
//if it is in selectmode then refresh indicator is not shown
notificationPredicate:
_selectionMode ? (_) => false : (_) => true,
onRefresh: () async => _refreshListProducts(
products,
localDatabase,
appLocalizations,
),
child: Consumer<UpToDateProductProvider>(
builder: (
_,
final UpToDateProductProvider provider,
__,
) =>
ListView.builder(
itemCount: products.length,
itemBuilder: (BuildContext context, int index) {
return _buildItem(
dismissible,
products,
index,
localDatabase,
appLocalizations,
);
},
),
),
),
),
),
),
);
}

Expand Down

0 comments on commit e06fdf1

Please sign in to comment.