-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flutter_web] notes widgets: LayoutCore_ContainerCell
- Loading branch information
Showing
2 changed files
with
27 additions
and
20 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
.../flutter_web/lib/routes/notes/cheatsheets/widgets/_examples/LayoutCore_ContainerCell.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,25 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
main() { | ||
runApp(const MaterialApp(home: Scaffold(body: LayoutCore_ContainerCell()))); | ||
} | ||
|
||
// ignore: camel_case_types | ||
class LayoutCore_ContainerCell extends StatelessWidget { | ||
const LayoutCore_ContainerCell({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
var colors = Theme.of(context).colorScheme; | ||
return Wrap(children: [ | ||
Container( | ||
width: 100, | ||
height: 100, | ||
alignment: Alignment.center, | ||
decoration: BoxDecoration(color: colors.surface, borderRadius: BorderRadius.circular(4.0), boxShadow: [ | ||
BoxShadow(color: colors.shadow.withOpacity(0.2), spreadRadius: 2, blurRadius: 2, offset: const Offset(2, 1)), | ||
]), | ||
child: const Text("模仿Card\nImitate Card")) | ||
]); | ||
} | ||
} |
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