-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from gazialankus/show_page_with_type_and_sele…
…ctor Show page with type and selector
- Loading branch information
Showing
5 changed files
with
146 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
examples/playground/lib/home/pages/custom_sheet_pages/product_with_sku_page.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import 'package:demo_ui_components/demo_ui_components.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:wolt_modal_sheet/wolt_modal_sheet.dart'; | ||
|
||
class ProductWithSkuPage extends WoltModalSheetPage { | ||
final int sku; | ||
|
||
ProductWithSkuPage(this.sku) | ||
: super( | ||
heroImage: Stack( | ||
fit: StackFit.passthrough, | ||
children: [ | ||
const Image( | ||
image: AssetImage('lib/assets/images/hero_image.jpg'), | ||
fit: BoxFit.cover, | ||
), | ||
Positioned( | ||
right: 30, | ||
bottom: 30, | ||
child: Center(child: ModalSheetTitle('SKU: $sku')), | ||
), | ||
], | ||
), | ||
stickyActionBar: const Padding( | ||
padding: EdgeInsets.fromLTRB(16, 0, 16, 16), | ||
child: WoltModalSheetCloseOrNextSab(), | ||
), | ||
pageTitle: ModalSheetTitle('Product with sku $sku'), | ||
leadingNavBarWidget: const WoltModalSheetBackButton(), | ||
trailingNavBarWidget: const WoltModalSheetCloseButton(), | ||
child: const Padding( | ||
padding: EdgeInsets.only(bottom: 80, top: 16, left: 16, right: 16), | ||
child: ModalSheetContentText(''' | ||
Instead of relying on the order of pages or the id values provided to pages, we can also look pages up by type and any other arbitrary value that the page may have. This gives the user the power to address pages in ways that may not be covered by other options. | ||
'''), | ||
), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters