Untitled
showModalBottomSheet( context: context, isScrollControlled: true, builder: (BuildContext context) { return FractionallySizedBox( heightFactor: 0.7, child: Container( padding: EdgeInsets.all(16.0), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.vertical( top: Radius.circular(16.0), ), ), child: Column( children: [ Container( width: 40, height: 4, margin: EdgeInsets.only(bottom: 16.0), decoration: BoxDecoration( color: Colors.grey, borderRadius: BorderRadius.circular(2), ), ), Expanded( child: Center( child: Text( 'This is a BottomSheet with a height of 70% of the screen.', style: TextStyle(fontSize: 16), textAlign: TextAlign.center, ), ), ), ], ), ), ); }, );
Leave a Comment