remove expand & center extension

null_safety
小赖 4 years ago
parent 871f34fca3
commit 31ea045a76

@ -11,8 +11,8 @@ extension TextStyleExtension on TextStyle {
///color
TextStyle colorX(Color color) => this.copyWith(color: color);
//specific values
//specific values
TextStyle get white => this.copyWith(color: kLightTextColor);
TextStyle get black => this.copyWith(color: kTextColor);

@ -1,8 +1,6 @@
import 'package:flutter/material.dart';
extension WidgetExt on Widget {
Widget get expanded => Expanded(child: this);
Widget get center => Center(child: this);
Widget paddingExt(double horizontal, [double vertical = 0]) => Padding(
padding: EdgeInsets.symmetric(
horizontal: horizontal,

@ -51,7 +51,7 @@ class ASCardExpandable extends StatefulWidget {
child: title.text.black.size(14.sp).make(),
),
DefaultTextStyle(style: TextStyle().black65.size(14), child: child)
.expanded,
.expand(),
suffix ?? SizedBox(),
10.wb,
],

@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:ansu_ui/styles/as_colors.dart';
import 'package:ansu_ui/extension/widget_extension.dart';
import 'package:ansu_ui/extension/num_extension.dart';
import 'package:ansu_ui/extension/text_style_extension.dart';
import 'package:ansu_ui/pickers/as_date_range_picker_part.dart';
@ -205,7 +204,7 @@ class _AS2DatePickerState extends State<AS2DatePicker> {
),
),
],
).expanded,
).expand(),
Container(
margin: EdgeInsets.symmetric(
horizontal: 24.w,

Loading…
Cancel
Save