Skip to content

Commit c01e653

Browse files
committed
Make banner full screen height with scrollable dark section below
1 parent 80fc09f commit c01e653

1 file changed

Lines changed: 22 additions & 11 deletions

File tree

lib/main.dart

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,29 @@ class HomePage extends StatelessWidget {
2323
@override
2424
Widget build(BuildContext context) {
2525
return Scaffold(
26-
body: Column(
27-
children: [
28-
Container(
29-
width: double.infinity,
30-
color: const Color(0xFF3A3A3A),
31-
padding: const EdgeInsets.all(16),
32-
child: const CircleAvatar(
33-
radius: 36,
34-
backgroundImage: NetworkImage('https://github.com/will-ch-h.png'),
26+
body: SingleChildScrollView(
27+
child: Column(
28+
children: [
29+
Container(
30+
width: double.infinity,
31+
height: MediaQuery.of(context).size.height,
32+
color: const Color(0xFF3A3A3A),
33+
padding: const EdgeInsets.symmetric(horizontal: 46, vertical: 26),
34+
alignment: Alignment.centerLeft,
35+
child: const CircleAvatar(
36+
radius: 76,
37+
backgroundImage: NetworkImage(
38+
'https://avatars.githubusercontent.com/will-ch-h',
39+
),
40+
),
3541
),
36-
),
37-
],
42+
Container(
43+
width: double.infinity,
44+
height: MediaQuery.of(context).size.height,
45+
color: const Color(0xFF2B2B2B),
46+
),
47+
],
48+
),
3849
),
3950
);
4051
}

0 commit comments

Comments
 (0)