Skip to content

Commit 2d46c8e

Browse files
blueneogeogitbook-bot
authored andcommitted
GitBook: [master] one page and one asset modified
1 parent 3d3eea8 commit 2d46c8e

File tree

2 files changed

+86
-3
lines changed

2 files changed

+86
-3
lines changed
23 KB
Loading

guide/styling-with-css.md

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ card
152152

153153
Here is the end result:
154154

155-
![](../.gitbook/assets/screen-shot-2018-12-14-at-3.55.26-pm.png)
155+
![](../.gitbook/assets/screen-shot-2018-12-14-at-3.55.26-pm%20%281%29.png)
156156

157157
{% tabs %}
158158
{% tab title="artist-card.pug" %}
@@ -193,9 +193,92 @@ card
193193
{% endtab %}
194194

195195
{% tab title="generated artist-card.dart" %}
196-
196+
```dart
197+
Card ArtistCard({ @required onBuyPressed, @required onListenPressed }) {
198+
return Card(
199+
child: Column(
200+
children: [
201+
ListTile(
202+
leading: Icon(
203+
Icons.album,
204+
color: Colors.white,
205+
),
206+
title: DefaultTextStyle.merge(
207+
child:
208+
//-- TITLE ----------------------------------------------------------
209+
Container(
210+
child: Text(
211+
'The Enchanted Nightingale',
212+
),
213+
padding: EdgeInsets.only(top: 4, right: 6, bottom: 4, left: 6),
214+
),
215+
style: TextStyle(
216+
color: Colors.white,
217+
),
218+
),
219+
subtitle: DefaultTextStyle.merge(
220+
child:
221+
//-- SUBTITLE ----------------------------------------------------------
222+
Container(
223+
child: Text(
224+
'Music by Julie Gable. Lyrics by Sidney Stein.',
225+
),
226+
padding: EdgeInsets.only(top: 2, right: 6, bottom: 2, left: 6),
227+
),
228+
style: TextStyle(
229+
color: Colors.grey.shade300,
230+
),
231+
),
232+
),
233+
ButtonTheme.bar(
234+
child: ButtonBar(
235+
children: [
236+
237+
//-- TICKETS ----------------------------------------------------------
238+
FlatButton(
239+
onPressed: () { onBuyPressed(); },
240+
child: DefaultTextStyle.merge(
241+
child:
242+
//-- LABEL ----------------------------------------------------------
243+
Container(
244+
child: Text(
245+
'Buy tickets'.toUpperCase(),
246+
),
247+
),
248+
style: TextStyle(
249+
color: Colors.white,
250+
),
251+
),
252+
),
253+
254+
//-- LISTEN ----------------------------------------------------------
255+
FlatButton(
256+
onPressed: () { onListenPressed(); },
257+
child: DefaultTextStyle.merge(
258+
child:
259+
//-- LABEL ----------------------------------------------------------
260+
Container(
261+
child: Text(
262+
'Listen'.toUpperCase(),
263+
),
264+
),
265+
style: TextStyle(
266+
color: Colors.white,
267+
),
268+
),
269+
)
270+
],
271+
),
272+
)
273+
]),
274+
mainAxisSize: MainAxisSize.min,
275+
),
276+
color: Colors.blue,
277+
);
278+
}
279+
```
197280
{% endtab %}
198281
{% endtabs %}
199282

200-
As you can see, Sass is a very nice match with Pug, since you can retain the same structure. This makes it easy to find the matching styles to your pug elements.
283+
As you can see here, Sass is a nice match with Pug, since you can retain the same structure. This makes it easy to find the matching styles to your pug elements.
201284

0 commit comments

Comments
 (0)