Created
September 11, 2022 01:04
-
-
Save VB10/b491441fc21ea06eadd75e3a408973ed to your computer and use it in GitHub Desktop.
Custom page sheet
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
class CustomPage extends StatelessWidget { | |
const CustomPage({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Container(); | |
} | |
} | |
extension CustomPageSheet on CustomPage { | |
Future<T?> show<T>(BuildContext context) { | |
return showModalBottomSheet(context: context, builder: (context) => this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment