@@ -3,7 +3,6 @@ import 'package:flutter_hooks/flutter_hooks.dart';
3
3
import 'package:flutter_module/messages.dart' ;
4
4
import 'package:flutter_module/presentation/styles/color_styles.dart' ;
5
5
import 'package:flutter_module/presentation/styles/dimens.dart' ;
6
- import 'package:flutter_module/presentation/styles/padding_styles.dart' ;
7
6
import 'package:flutter_module/presentation/styles/text_styles.dart' ;
8
7
import 'package:flutter_module/presentation/widgets/code_text_view.dart' ;
9
8
import 'package:flutter_module/utils/extensions/text_extensions.dart' ;
@@ -19,49 +18,53 @@ class SnippetListTile extends HookWidget {
19
18
20
19
@override
21
20
Widget build (BuildContext context) {
21
+ // TODO Export surface
22
22
return Card (
23
23
color: ColorStyles .surfacePrimary (),
24
24
shape: RoundedRectangleBorder (
25
25
borderRadius: BorderRadius .circular (Dimens .m),
26
26
),
27
- // TODO Fix full width
28
- child: Expanded (
29
- child: Column (
30
- crossAxisAlignment: CrossAxisAlignment .stretch,
31
- children: [
32
- Padding (
33
- padding: const EdgeInsets .only (
34
- top: Dimens .l,
35
- left: Dimens .l,
36
- right: Dimens .l,
37
- bottom: Dimens .m
38
- ),
39
- child: TextStyles .title (snippet.title ?? "" ),
40
- ),
41
- ColoredBox (
42
- color: ColorStyles .codeBackground (),
43
- child: Padding (
44
- padding: const EdgeInsets .symmetric (
45
- vertical: Dimens .m,
46
- horizontal: Dimens .l,
27
+ child: InkWell (
28
+ borderRadius: BorderRadius .circular (Dimens .m),
29
+ onTap: () {},
30
+ child: Expanded (
31
+ child: Column (
32
+ crossAxisAlignment: CrossAxisAlignment .stretch,
33
+ children: [
34
+ Padding (
35
+ padding: const EdgeInsets .only (
36
+ top: Dimens .l,
37
+ left: Dimens .l,
38
+ right: Dimens .l,
39
+ bottom: Dimens .m
47
40
),
48
- child: Expanded (
49
- child: CodeTextView .preview (
50
- code: snippet.code? .raw ?? "" ,
51
- tokens: snippet.code? .tokens,
41
+ child: TextStyles .title (snippet.title ?? "" ),
42
+ ),
43
+ Ink (
44
+ color: ColorStyles .codeBackground (),
45
+ child: Padding (
46
+ padding: const EdgeInsets .symmetric (
47
+ vertical: Dimens .m,
48
+ horizontal: Dimens .l,
49
+ ),
50
+ child: Expanded (
51
+ child: CodeTextView .preview (
52
+ code: snippet.code? .raw ?? "" ,
53
+ tokens: snippet.code? .tokens,
54
+ ),
52
55
),
53
56
),
54
57
),
55
- ),
56
- const SizedBox (height: Dimens .m),
57
- if (isExpanded) ...[
58
- Padding (
59
- padding: const EdgeInsets .symmetric (horizontal: Dimens .l),
60
- child: SnippetDetailsBar (snippet: snippet),
61
- ),
62
58
const SizedBox (height: Dimens .m),
59
+ if (isExpanded) ...[
60
+ Padding (
61
+ padding: const EdgeInsets .symmetric (horizontal: Dimens .l),
62
+ child: SnippetDetailsBar (snippet: snippet),
63
+ ),
64
+ const SizedBox (height: Dimens .m),
65
+ ],
63
66
],
64
- ] ,
67
+ ) ,
65
68
),
66
69
),
67
70
);
0 commit comments