浏览代码

update

/siyaoH-1.17-PlatformMessage
siyao 4 年前
当前提交
24eccf24
共有 7 个文件被更改,包括 346 次插入100 次删除
  1. 82
      com.unity.uiwidgets/Runtime/material/app.cs
  2. 2
      com.unity.uiwidgets/Runtime/material/banner_theme.cs
  3. 9
      com.unity.uiwidgets/Runtime/material/bottom_app_bar.cs
  4. 2
      com.unity.uiwidgets/Runtime/material/bottom_app_bar_theme.cs
  5. 170
      com.unity.uiwidgets/Runtime/material/bottom_navigation_bar.cs
  6. 66
      com.unity.uiwidgets/Runtime/painting/edge_insets.cs
  7. 115
      com.unity.uiwidgets/Runtime/material/banner.cs

82
com.unity.uiwidgets/Runtime/material/app.cs


using TextStyle = Unity.UIWidgets.painting.TextStyle;
namespace Unity.UIWidgets.material {
static class AppUtils {
public partial class material_ {
public static readonly TextStyle _errorTextStyle = new TextStyle(
color: new Color(0xD0FF0000),
fontFamily: "monospace",

);
}
public enum ThemeMode {
system,
light,
dark,
}
public class MaterialApp : StatefulWidget {
public MaterialApp(

Dictionary<string, WidgetBuilder> routes = null,
string initialRoute = null,
RouteFactory onGenerateRoute = null,
InitialRouteListFactory onGenerateInitialRoutes = null,
RouteFactory onUnknownRoute = null,
List<NavigatorObserver> navigatorObservers = null,
TransitionBuilder builder = null,

ThemeData darkTheme = null,
ThemeMode themeMode = ThemeMode.system,
bool showPerformanceOverlay = false
bool showPerformanceOverlay = false,
bool checkerboardRasterCacheImages = false,
bool checkerboardOffscreenLayers = false,
bool debugShowCheckedModeBanner = true,
Dictionary<LogicalKeySet, Intent> shortcuts = null,
Dictionary<LocalKey, ActionFactory> actions = null
this.onGenerateInitialRoutes = onGenerateInitialRoutes;
this.initialRoute = initialRoute;
this.onGenerateRoute = onGenerateRoute;
this.onUnknownRoute = onUnknownRoute;

this.color = color;
this.theme = theme;
this.darkTheme = darkTheme;
this.themeMode = themeMode;
this.locale = locale;
this.localizationsDelegates = localizationsDelegates;
this.localeListResolutionCallback = localeListResolutionCallback;

this.checkerboardRasterCacheImages = checkerboardRasterCacheImages;
this.checkerboardOffscreenLayers = checkerboardOffscreenLayers;
this.debugShowCheckedModeBanner = debugShowCheckedModeBanner;
this.shortcuts = shortcuts;
this.actions = actions;
}
public readonly GlobalKey<NavigatorState> navigatorKey;

public readonly RouteFactory onGenerateRoute;
public readonly InitialRouteListFactory onGenerateInitialRoutes;
public readonly RouteFactory onUnknownRoute;
public readonly List<NavigatorObserver> navigatorObservers;

public readonly ThemeData theme;
public readonly ThemeData darkTheme;
public readonly ThemeMode themeMode;
public readonly Color color;

public readonly bool showPerformanceOverlay;
public readonly bool checkerboardRasterCacheImages;
public readonly bool checkerboardOffscreenLayers;
public readonly bool debugShowCheckedModeBanner;
public readonly Dictionary<LogicalKeySet, Intent> shortcuts;
public readonly Dictionary<LocalKey, ActionFactory> actions;
public override void initState() {
base.initState();
_heroController = new HeroController(createRectTween: _createRectTween);

if (widget.navigatorKey != (oldWidget as MaterialApp).navigatorKey) {
_heroController = new HeroController(createRectTween: _createRectTween);
}
_updateNavigator();
}

if (widget.localizationsDelegates != null) {
_delegates.AddRange(widget.localizationsDelegates);
}
_delegates.Add(DefaultCupertinoLocalizations.del);
_delegates.Add(DefaultMaterialLocalizations.del);
return new List<LocalizationsDelegate>(_delegates);

routes: widget.routes,
initialRoute: widget.initialRoute,
onGenerateRoute: widget.onGenerateRoute,
onGenerateInitialRoutes: widget.onGenerateInitialRoutes,
ThemeData theme;
Brightness platformBrightness = MediaQuery.platformBrightnessOf(_context);
if (platformBrightness == Brightness.dark && widget.darkTheme != null) {
theme = widget.darkTheme;
ThemeMode mode = widget.themeMode;
ThemeData theme = null;
if (widget.darkTheme != null) {
ui.Brightness platformBrightness = MediaQuery.platformBrightnessOf(context);
if (mode == ThemeMode.dark ||
(mode == ThemeMode.system && platformBrightness == ui.Brightness.dark)) {
theme = widget.darkTheme;
}
else if (widget.theme != null) {
theme = widget.theme;
}
else {
theme = ThemeData.fallback();
}
theme = theme ?? widget.theme ?? ThemeData.fallback();
return new AnimatedTheme(
data: theme,

: child
);
},
textStyle: AppUtils._errorTextStyle,
textStyle: material_._errorTextStyle,
showPerformanceOverlay: widget.showPerformanceOverlay
showPerformanceOverlay: widget.showPerformanceOverlay,
checkerboardRasterCacheImages: widget.checkerboardRasterCacheImages,
checkerboardOffscreenLayers: widget.checkerboardOffscreenLayers,
debugShowCheckedModeBanner: widget.debugShowCheckedModeBanner,
inspectorSelectButtonBuilder: (BuildContext contextIn, VoidCallback onPressed) => {
return new FloatingActionButton(
child: new Icon(Icons.search),
onPressed: onPressed,
mini: true
);
},
shortcuts: widget.shortcuts,
actions: widget.actions
);
return result;

2
com.unity.uiwidgets/Runtime/material/banner_theme.cs


public readonly MaterialBannerThemeData data;
static MaterialBannerThemeData of(BuildContext context) {
public static MaterialBannerThemeData of(BuildContext context) {
MaterialBannerTheme bannerTheme = context.dependOnInheritedWidgetOfExactType<MaterialBannerTheme>();
return bannerTheme?.data ?? Theme.of(context).bannerTheme;
}

9
com.unity.uiwidgets/Runtime/material/bottom_app_bar.cs


using uiwidgets;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.rendering;

notchMargin: widget.notchMargin
)
: new ShapeBorderClipper(shape: new RoundedRectangleBorder());
float elevation = widget.elevation ?? babTheme.elevation ?? _defaultElevation;
Color color = widget.color ?? babTheme.color ?? Theme.of(context).bottomAppBarColor;
Color effectiveColor = ElevationOverlay.applyOverlay(context, color, elevation);
elevation: widget.elevation ?? babTheme.elevation ?? _defaultElevation,
color: widget.color ?? babTheme.color ?? Theme.of(context).bottomAppBarColor,
elevation: elevation,
color: effectiveColor,
clipBehavior: widget.clipBehavior,
child: new Material(
type: MaterialType.transparency,

2
com.unity.uiwidgets/Runtime/material/bottom_app_bar_theme.cs


public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new DiagnosticsProperty<Color>("color", color, defaultValue: null));
properties.add(new ColorProperty("color", color, defaultValue: null));
properties.add(new DiagnosticsProperty<float?>("elevation", elevation, defaultValue: null));
properties.add(new DiagnosticsProperty<NotchedShape>("shape", shape, defaultValue: null));
}

170
com.unity.uiwidgets/Runtime/material/bottom_navigation_bar.cs


float iconSize = 24.0f,
Color selectedItemColor = null,
Color unselectedItemColor = null,
IconThemeData selectedIconTheme = null,
IconThemeData unselectedIconTheme = null,
TextStyle selectedLabelStyle = null,
TextStyle unselectedLabelStyle = null,
bool showSelectedLabels = true,
bool? showUnselectedLabels = null
) : base(key: key) {

this.iconSize = iconSize;
this.selectedItemColor = selectedItemColor ?? fixedColor;
this.unselectedItemColor = unselectedItemColor;
this.selectedIconTheme = selectedIconTheme;
this.unselectedIconTheme = unselectedIconTheme;
this.selectedLabelStyle = selectedLabelStyle;
this.unselectedLabelStyle = unselectedLabelStyle;
this.showUnselectedLabels = showUnselectedLabels ?? _defaultShowUnselected(_type(type, items));
}

public readonly Color unselectedItemColor;
public readonly IconThemeData selectedIconTheme;
public readonly IconThemeData unselectedIconTheme;
public readonly TextStyle selectedLabelStyle;
public readonly TextStyle unselectedLabelStyle;
public readonly float selectedFontSize;
public readonly float unselectedFontSize;

ColorTween colorTween = null,
float? flex = null,
bool selected = false,
float? selectedFontSize = null,
float? unselectedFontSize = null,
IconThemeData selectedIconTheme = null,
IconThemeData unselectedIconTheme = null,
TextStyle selectedLabelStyle = null,
TextStyle unselectedLabelStyle = null,
bool? showSelectedLabels = null,
bool? showUnselectedLabels = null,
string indexLabel = null

D.assert(animation != null);
D.assert(selectedFontSize != null && selectedFontSize >= 0);
D.assert(unselectedFontSize != null && unselectedFontSize >= 0);
D.assert(selectedLabelStyle != null);
D.assert(unselectedLabelStyle != null);
this.type = type;
this.item = item;
this.animation = animation;

this.flex = flex;
this.selected = selected;
this.selectedFontSize = selectedFontSize.Value;
this.unselectedFontSize = unselectedFontSize.Value;
this.selectedLabelStyle = selectedLabelStyle;
this.unselectedLabelStyle = unselectedLabelStyle;
this.selectedIconTheme = selectedIconTheme;
this.unselectedIconTheme = unselectedIconTheme;
this.showSelectedLabels = showSelectedLabels ?? false;
this.showUnselectedLabels = showUnselectedLabels ?? false;
this.indexLabel = indexLabel;

public readonly ColorTween colorTween;
public readonly float? flex;
public readonly bool selected;
public readonly float selectedFontSize;
public readonly float unselectedFontSize;
public readonly IconThemeData selectedIconTheme;
public readonly IconThemeData unselectedIconTheme;
public readonly TextStyle selectedLabelStyle;
public readonly TextStyle unselectedLabelStyle;
public readonly string indexLabel;
public readonly bool showSelectedLabels;
public readonly bool showUnselectedLabels;

float bottomPadding = selectedFontSize / 2.0f;
float topPadding = selectedFontSize / 2.0f;
float selectedFontSize = selectedLabelStyle.fontSize ?? 0;
float selectedIconSize = selectedIconTheme?.size ?? iconSize ?? 0;
float unselectedIconSize = unselectedIconTheme?.size ?? iconSize ?? 0;
float selectedIconDiff = Mathf.Max(selectedIconSize - unselectedIconSize, 0);
float unselectedIconDiff = Mathf.Max(unselectedIconSize - selectedIconSize, 0);
float bottomPadding = 0;
float topPadding = 0;
begin: 0.0f,
end: selectedFontSize / 2.0f
begin: selectedIconDiff / 2.0f,
end: selectedFontSize / 2.0f - unselectedIconDiff / 2.0f
begin: selectedFontSize,
end: selectedFontSize / 2.0f
begin: selectedFontSize + selectedIconDiff / 2.0f,
end: selectedFontSize / 2.0f - unselectedIconDiff / 2.0f
if (!showSelectedLabels && !showUnselectedLabels) {
bottomPadding = 0.0f;
topPadding = selectedFontSize;
else if (!showSelectedLabels && !showUnselectedLabels) {
bottomPadding = new FloatTween(
begin: selectedIconDiff / 2.0f,
end: unselectedIconDiff / 2.0f
).evaluate(animation);
topPadding = new FloatTween(
begin: selectedFontSize + selectedIconDiff / 2.0f,
end: selectedFontSize + unselectedIconDiff / 2.0f
).evaluate(animation);
else {
bottomPadding = new FloatTween(
begin: selectedFontSize / 2.0f + selectedIconDiff / 2.0f,
end: selectedFontSize / 2.0f + unselectedIconDiff / 2.0f
).evaluate(animation);
topPadding = new FloatTween(
begin: selectedFontSize / 2.0f + selectedIconDiff / 2.0f,
end: selectedFontSize / 2.0f + unselectedIconDiff / 2.0f
).evaluate(animation);
}
switch (type) {
case BottomNavigationBarType.fix:
size = 1;

animation: animation,
iconSize: iconSize,
selected: selected,
item: item
item: item,
selectedIconTheme: selectedIconTheme,
unselectedIconTheme: unselectedIconTheme
selectedFontSize: selectedFontSize,
unselectedFontSize: unselectedFontSize,
selectedLabelStyle: selectedLabelStyle,
unselectedLabelStyle: unselectedLabelStyle,
showSelectedLabels: showSelectedLabels,
showUnselectedLabels: showUnselectedLabels
)

Animation<float> animation = null,
float? iconSize = null,
bool? selected = null,
BottomNavigationBarItem item = null
BottomNavigationBarItem item = null,
IconThemeData selectedIconTheme = null,
IconThemeData unselectedIconTheme = null
) : base(key: key) {
D.assert(selected != null);
D.assert(item != null);

this.selected = selected;
this.item = item;
this.selectedIconTheme = selectedIconTheme;
this.unselectedIconTheme = unselectedIconTheme;
ColorTween colorTween;
Animation<float> animation;
float? iconSize;
bool? selected;
BottomNavigationBarItem item;
public readonly ColorTween colorTween;
public readonly Animation<float> animation;
public readonly float? iconSize;
public readonly bool? selected;
public readonly BottomNavigationBarItem item;
public readonly IconThemeData selectedIconTheme;
public readonly IconThemeData unselectedIconTheme;
IconThemeData defaultIconTheme = new IconThemeData(
color: iconColor,
size: iconSize
);
IconThemeData iconThemeData = IconThemeData.lerp(
defaultIconTheme.merge(unselectedIconTheme),
defaultIconTheme.merge(selectedIconTheme),
animation.value
);
return new Align(
alignment: Alignment.topCenter,

data: new IconThemeData(
color: iconColor,
size: iconSize
),
data: iconThemeData,
child: selected == true ? item.activeIcon : item.icon
)
)

ColorTween colorTween = null,
Animation<float> animation = null,
BottomNavigationBarItem item = null,
float? selectedFontSize = null,
float? unselectedFontSize = null,
TextStyle selectedLabelStyle = null,
TextStyle unselectedLabelStyle = null,
bool? showSelectedLabels = null,
bool? showUnselectedLabels = null
) : base(key: key) {

D.assert(selectedFontSize != null);
D.assert(unselectedFontSize != null);
D.assert(selectedLabelStyle != null);
D.assert(unselectedLabelStyle != null);
this.selectedFontSize = selectedFontSize.Value;
this.unselectedFontSize = unselectedFontSize.Value;
this.selectedLabelStyle = selectedLabelStyle;
this.unselectedLabelStyle = unselectedLabelStyle;
this.showSelectedLabels = showSelectedLabels.Value;
this.showUnselectedLabels = showUnselectedLabels.Value;
}

public readonly BottomNavigationBarItem item;
public readonly float selectedFontSize;
public readonly float unselectedFontSize;
public readonly TextStyle selectedLabelStyle;
public readonly TextStyle unselectedLabelStyle;
float selectedFontSize = selectedLabelStyle.fontSize ?? 0;
float unselectedFontSize = unselectedLabelStyle.fontSize ?? 0;
TextStyle customStyle = TextStyle.lerp(
unselectedLabelStyle,
selectedLabelStyle,
animation.value
);
.evaluate(animation);
.evaluate(animation);
style: new TextStyle(
style: customStyle.copyWith(
fontSize: selectedFontSize,
color: colorTween.evaluate(animation)
),

child: text
);
}
return new Align(
alignment: Alignment.bottomCenter,
heightFactor: 1.0f,

}
}
static TextStyle _effectiveTextStyle(TextStyle textStyle, float fontSize) {
textStyle = textStyle ?? new TextStyle();
return textStyle.fontSize == null ? textStyle.copyWith(fontSize: fontSize) : textStyle;
}
TextStyle effectiveSelectedLabelStyle =
_effectiveTextStyle(widget.selectedLabelStyle, widget.selectedFontSize);
TextStyle effectiveUnselectedLabelStyle =
_effectiveTextStyle(widget.unselectedLabelStyle, widget.unselectedFontSize);
Color themeColor;
switch (themeData.brightness) {
case Brightness.light:

widget.items[i],
_animations[i],
widget.iconSize,
selectedFontSize: widget.selectedFontSize,
unselectedFontSize: widget.unselectedFontSize,
selectedIconTheme: widget.selectedIconTheme,
unselectedIconTheme: widget.unselectedIconTheme,
selectedLabelStyle: effectiveSelectedLabelStyle,
unselectedLabelStyle: effectiveUnselectedLabelStyle,
onTap: () => {
if (widget.onTap != null) {
widget.onTap(index);

selected: i == widget.currentIndex,
showSelectedLabels: widget.showSelectedLabels,
showUnselectedLabels: widget.showUnselectedLabels,
indexLabel: localizations.tabLabel(tabIndex: i+1, tabCount: widget.items.Count)
indexLabel: localizations.tabLabel(tabIndex: i + 1, tabCount: widget.items.Count)
));
}

66
com.unity.uiwidgets/Runtime/painting/edge_insets.cs


using Rect = Unity.UIWidgets.ui.Rect;
namespace Unity.UIWidgets.painting {
public abstract class EdgeInsetsGeometry {
internal float _bottom { get; }
internal float _end { get; }

}
public override string ToString() {
if (_start == 0.0 && _end == 0.0) {
if (_left == 0.0 && _right == 0.0 && _top == 0.0 && _bottom == 0.0)

public static bool operator !=(EdgeInsetsGeometry a, EdgeInsetsGeometry b) {
return !(a == b);
}
}
class EdgeInsetsDirectional : EdgeInsetsGeometry {

return new EdgeInsetsDirectional(start, top, end, bottom);
}
public static EdgeInsetsDirectional only() {
return new EdgeInsetsDirectional(0f, 0f, 0f, 0f);
public static EdgeInsetsDirectional only(float start = 0, float top = 0, float end = 0, float bottom = 0) {
return new EdgeInsetsDirectional(start, top, end, bottom);
}
static EdgeInsetsDirectional zero = only();

}
public EdgeInsetsDirectional flipped {
get { return fromSTEB(end, bottom, start, top);}
public EdgeInsetsDirectional flipped {
get { return fromSTEB(end, bottom, start, top); }
public EdgeInsetsGeometry subtract(EdgeInsetsDirectional other) {
public EdgeInsetsGeometry subtract(EdgeInsetsDirectional other) {
return this - other;
return this - other;
}
public EdgeInsetsGeometry add(EdgeInsetsDirectional other) {
}
public EdgeInsetsGeometry add(EdgeInsetsDirectional other) {
return this + other;
return this + other;
public static EdgeInsetsDirectional operator -(EdgeInsetsDirectional a, EdgeInsetsDirectional b) {
public static EdgeInsetsDirectional operator -(EdgeInsetsDirectional a, EdgeInsetsDirectional b) {
return fromSTEB(
a.start - b.start,
a.top - b.top,

}
public static EdgeInsetsDirectional operator +(EdgeInsetsDirectional a, EdgeInsetsDirectional b) {
public static EdgeInsetsDirectional operator +(EdgeInsetsDirectional a, EdgeInsetsDirectional b) {
return fromSTEB(
a.start + b.start,
a.top + b.top,

}
public static EdgeInsetsDirectional operator -(EdgeInsetsDirectional a) {
public static EdgeInsetsDirectional operator -(EdgeInsetsDirectional a) {
return fromSTEB(
-a.start,
-a.top,

}
public static EdgeInsetsDirectional operator *(EdgeInsetsDirectional a, float b) {
public static EdgeInsetsDirectional operator *(EdgeInsetsDirectional a, float b) {
return fromSTEB(
a.start * b,
a.top * b,

}
public static EdgeInsetsDirectional operator /(EdgeInsetsDirectional a, float b) {
public static EdgeInsetsDirectional operator /(EdgeInsetsDirectional a, float b) {
return fromSTEB(
a.start / b,
a.top / b,

}
public static EdgeInsetsDirectional operator %(EdgeInsetsDirectional a, float b) {
public static EdgeInsetsDirectional operator %(EdgeInsetsDirectional a, float b) {
return fromSTEB(
a.start % b,
a.top % b,

}
public static EdgeInsetsDirectional lerp(EdgeInsetsDirectional a, EdgeInsetsDirectional b,float t) {
public static EdgeInsetsDirectional lerp(EdgeInsetsDirectional a, EdgeInsetsDirectional b, float t) {
return null;
return null;
return b * t;
return b * t;
return a * (1.0f - t);
return a * (1.0f - t);
return fromSTEB(
Mathf.Lerp(a.start, b.start, t),
Mathf.Lerp(a.top, b.top, t),

}
}
case TextDirection.rtl:
return EdgeInsets.fromLTRB(end, top, start, bottom);
case TextDirection.ltr:
return EdgeInsets.fromLTRB(start, top, end, bottom);
case TextDirection.rtl:
return EdgeInsets.fromLTRB(end, top, start, bottom);
case TextDirection.ltr:
return EdgeInsets.fromLTRB(start, top, end, bottom);
return null;
}
}

public static _MixedEdgeInsets fromLRSETB(float _left, float _right, float _start, float _end, float _top,
float _bottom) {
return new _MixedEdgeInsets(_left, _right, _start, _end, _top, _bottom);
}
public readonly float _left;

return null;
}
}
public class EdgeInsets : EdgeInsetsGeometry {

float.PositiveInfinity,
float.PositiveInfinity
);
public bool isNonNegative {
get {
return left >= 0.0

bottom.clamp(min._bottom, max._bottom)
);
}
public static EdgeInsets operator -(EdgeInsets a, EdgeInsets b) {
return fromLTRB(
a.left - b.left,

115
com.unity.uiwidgets/Runtime/material/banner.cs


using System.Collections.Generic;
using Unity.UIWidgets.foundation;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using Unity.UIWidgets.widgets;
using TextStyle = Unity.UIWidgets.painting.TextStyle;
namespace Unity.UIWidgets.material {
class MaterialBanner : StatelessWidget {
public MaterialBanner(
Key key = null,
Widget content = null,
TextStyle contentTextStyle = null,
List<Widget> actions = null,
Widget leading = null,
Color backgroundColor = null,
EdgeInsetsGeometry padding = null,
EdgeInsetsGeometry leadingPadding = null,
bool forceActionsBelow = false
) : base(key: key) {
D.assert(content != null);
D.assert(actions != null);
this.content = content;
this.contentTextStyle = contentTextStyle;
this.actions = actions;
this.leading = leading;
this.backgroundColor = backgroundColor;
this.padding = padding;
this.leadingPadding = leadingPadding;
this.forceActionsBelow = forceActionsBelow;
}
public readonly Widget content;
public readonly TextStyle contentTextStyle;
public readonly List<Widget> actions;
public readonly Widget leading;
public readonly Color backgroundColor;
public readonly EdgeInsetsGeometry padding;
public readonly EdgeInsetsGeometry leadingPadding;
public readonly bool forceActionsBelow;
public override Widget build(BuildContext context) {
D.assert(actions.isNotEmpty);
ThemeData theme = Theme.of(context);
MaterialBannerThemeData bannerTheme = MaterialBannerTheme.of(context);
bool isSingleRow = actions.Count == 1 && !forceActionsBelow;
EdgeInsetsGeometry padding = this.padding ?? bannerTheme.padding ?? (isSingleRow
? EdgeInsetsDirectional.only(start: 16.0f, top: 2.0f)
: EdgeInsetsDirectional.only(start: 16.0f, top: 24.0f, end: 16.0f,
bottom: 4.0f));
EdgeInsetsGeometry leadingPadding = this.leadingPadding
?? bannerTheme.padding
?? EdgeInsetsDirectional.only(end: 16.0f);
Widget buttonBar = new ButtonBar(
layoutBehavior: ButtonBarLayoutBehavior.constrained,
children: actions
);
Color backgroundColor = this.backgroundColor
?? bannerTheme.backgroundColor
?? theme.colorScheme.surface;
TextStyle textStyle = contentTextStyle
?? bannerTheme.contentTextStyle
?? theme.textTheme.bodyText2;
var rowList = new List<Widget>();
if (leading != null) {
rowList.Add(new Padding(
padding: (EdgeInsets) leadingPadding,
child: leading
));
}
rowList.Add(new Expanded(
child: new DefaultTextStyle(
style: textStyle,
child: content
)
));
if (isSingleRow) {
rowList.Add(buttonBar);
}
var columnList = new List<Widget>();
columnList.Add(new Padding(
padding: (EdgeInsets) padding,
child: new Row(
children: rowList
)
));
if (!isSingleRow) {
columnList.Add(buttonBar);
}
columnList.Add(new Divider(height: 0));
return new Container(
color: backgroundColor,
child: new Column(
children: columnList
)
);
}
}
}
正在加载...
取消
保存