首次提交:初始化项目
This commit is contained in:
31
lib/widgets/page_mixin.dart
Normal file
31
lib/widgets/page_mixin.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
|
||||
mixin PageMixin {
|
||||
Widget description({required Widget content}) {
|
||||
return Builder(
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.only(bottom: 4),
|
||||
child: DefaultTextStyle(
|
||||
style: FluentTheme.of(context).typography.body!,
|
||||
child: content,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget subtitle({required Widget content}) {
|
||||
return Builder(
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.only(top: 14, bottom: 2),
|
||||
child: DefaultTextStyle(
|
||||
style: FluentTheme.of(context).typography.subtitle!,
|
||||
child: content,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user