Revert "Made elements on component screen stay compact on wider screen (#1258)" (#1266)

This reverts commit a9eaf1a733.
pull/1267/head
Brett Morgan 2 years ago committed by GitHub
parent a9eaf1a733
commit 53c83adc71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,32 +11,26 @@ class ComponentScreen extends StatelessWidget {
return Expanded( return Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
child: Align( child: ListView(
alignment: Alignment.topCenter, shrinkWrap: true,
child: SizedBox( children: [
width: _maxWidthConstraint, _colDivider,
child: ListView( _colDivider,
shrinkWrap: true, const Buttons(),
children: [ _colDivider,
_colDivider, const FloatingActionButtons(),
_colDivider, _colDivider,
const Buttons(), const Cards(),
_colDivider, _colDivider,
const FloatingActionButtons(), const Dialogs(),
_colDivider, _colDivider,
const Cards(), showNavBottomBar
_colDivider, ? const NavigationBars(
const Dialogs(), selectedIndex: 0,
_colDivider, isExampleBar: true,
showNavBottomBar )
? const NavigationBars( : Container(),
selectedIndex: 0, ],
isExampleBar: true,
)
: Container(),
],
),
),
), ),
), ),
); );
@ -46,7 +40,6 @@ class ComponentScreen extends StatelessWidget {
const _rowDivider = SizedBox(width: 10); const _rowDivider = SizedBox(width: 10);
const _colDivider = SizedBox(height: 10); const _colDivider = SizedBox(height: 10);
const double _cardWidth = 115; const double _cardWidth = 115;
const double _maxWidthConstraint = 400;
void Function()? handlePressed( void Function()? handlePressed(
BuildContext context, bool isDisabled, String buttonName) { BuildContext context, bool isDisabled, String buttonName) {
@ -262,7 +255,8 @@ class Cards extends StatelessWidget {
alignment: Alignment.topRight, alignment: Alignment.topRight,
child: Icon(Icons.more_vert), child: Icon(Icons.more_vert),
), ),
SizedBox(height: 35), _colDivider,
_colDivider,
Align( Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: Text("Elevated"), child: Text("Elevated"),
@ -285,7 +279,8 @@ class Cards extends StatelessWidget {
alignment: Alignment.topRight, alignment: Alignment.topRight,
child: Icon(Icons.more_vert), child: Icon(Icons.more_vert),
), ),
SizedBox(height: 35), _colDivider,
_colDivider,
Align( Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: Text("Filled"), child: Text("Filled"),
@ -313,7 +308,8 @@ class Cards extends StatelessWidget {
alignment: Alignment.topRight, alignment: Alignment.topRight,
child: Icon(Icons.more_vert), child: Icon(Icons.more_vert),
), ),
SizedBox(height: 35), _colDivider,
_colDivider,
Align( Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: Text("Outlined"), child: Text("Outlined"),

@ -187,7 +187,7 @@ class _Material3DemoState extends State<Material3Demo> {
selectedIndex: screenIndex)), selectedIndex: screenIndex)),
const VerticalDivider(thickness: 1, width: 1), const VerticalDivider(thickness: 1, width: 1),
createScreenFor(screenIndex, true), createScreenFor(screenIndex, true),
],), ]),
), ),
); );
} }

Loading…
Cancel
Save