Skip to content

Commit c0fecff

Browse files
Tomasz KądziołkaTomasz Kądziołka
authored andcommitted
Corrected splash effect
1 parent 0a2597d commit c0fecff

File tree

2 files changed

+37
-34
lines changed

2 files changed

+37
-34
lines changed

flutter_module/lib/presentation/styles/color_styles.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class ColorStyles extends Color {
66

77
ColorStyles.pageBackground(): super(0xFFF5F5F5);
88

9-
ColorStyles.codeBackground(): super(0xFFF0F0F0);
9+
ColorStyles.codeBackground(): super(0xFFF8F8F8);
1010

1111
}

flutter_module/lib/presentation/widgets/snippet_list_item.dart

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'package:flutter_hooks/flutter_hooks.dart';
33
import 'package:flutter_module/messages.dart';
44
import 'package:flutter_module/presentation/styles/color_styles.dart';
55
import 'package:flutter_module/presentation/styles/dimens.dart';
6-
import 'package:flutter_module/presentation/styles/padding_styles.dart';
76
import 'package:flutter_module/presentation/styles/text_styles.dart';
87
import 'package:flutter_module/presentation/widgets/code_text_view.dart';
98
import 'package:flutter_module/utils/extensions/text_extensions.dart';
@@ -19,49 +18,53 @@ class SnippetListTile extends HookWidget {
1918

2019
@override
2120
Widget build(BuildContext context) {
21+
// TODO Export surface
2222
return Card(
2323
color: ColorStyles.surfacePrimary(),
2424
shape: RoundedRectangleBorder(
2525
borderRadius: BorderRadius.circular(Dimens.m),
2626
),
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
4740
),
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+
),
5255
),
5356
),
5457
),
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-
),
6258
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+
],
6366
],
64-
],
67+
),
6568
),
6669
),
6770
);

0 commit comments

Comments
 (0)