This repository was archived by the owner on Apr 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ CardTheme copyWith(
38
38
ShapeBorder shape = null
39
39
) {
40
40
return new CardTheme (
41
- clipBehavior : this . clipBehavior ?? this . clipBehavior ,
41
+ clipBehavior : clipBehavior ?? this . clipBehavior ,
42
42
color : color ?? this . color ,
43
- elevation : this . elevation ?? this . elevation ,
43
+ elevation : elevation ?? this . elevation ,
44
44
margin : margin ?? this . margin ,
45
45
shape : shape ?? this . shape
46
46
) ;
Original file line number Diff line number Diff line change 8
8
using Unity . UIWidgets . ui ;
9
9
using Unity . UIWidgets . widgets ;
10
10
using UnityEngine ;
11
+ using Image = Unity . UIWidgets . widgets . Image ;
11
12
12
13
namespace UIWidgetsSample {
13
14
public class MaterialThemeSample : UIWidgetsSamplePanel {
@@ -44,11 +45,32 @@ public override Widget build(BuildContext context) {
44
45
) ,
45
46
cardTheme : new CardTheme (
46
47
color : Colors . red ,
47
- elevation : 6 .0f
48
+ elevation : 2 .0f
48
49
)
49
50
) ,
50
51
child : new Scaffold (
51
52
appBar : new AppBar ( title : new Text ( "Test App Bar Theme" ) ) ,
53
+ body : new Center (
54
+ child : new Card (
55
+ shape : new RoundedRectangleBorder (
56
+ borderRadius : BorderRadius . all ( 5.0f )
57
+ ) ,
58
+ child : new Container (
59
+ height : 250 ,
60
+ child : new Column (
61
+ children : new List < Widget > {
62
+ Image . asset (
63
+ "products/backpack" ,
64
+ fit : BoxFit . cover ,
65
+ width : 200 ,
66
+ height : 200
67
+ ) ,
68
+ new Text ( "Card Theme" )
69
+ }
70
+ )
71
+ )
72
+ )
73
+ ) ,
52
74
bottomNavigationBar : new BottomAppBar (
53
75
child : new Row (
54
76
mainAxisSize : MainAxisSize . max ,
You can’t perform that action at this time.
0 commit comments