Skip to content

Commit 2ef44a9

Browse files
committed
feat: responsivity on large screens
1 parent 90498ee commit 2ef44a9

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

lib/pages/home_page.dart

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import 'dart:ui';
22

3+
import 'package:flutter/foundation.dart';
34
import 'package:flutter/material.dart';
45
import 'package:portfolio/pages/project_page.dart';
56
import 'package:portfolio/pages/projects/cofence_page.dart';
67
import 'package:portfolio/pages/projects/fencing_tableau_page.dart';
78
import 'package:portfolio/pages/projects/funcially_page.dart';
89

9-
const double mediumScreenWidth = 1000;
10-
// TODO: properly set this
11-
const double largeScreenWidth = 2000;
10+
const double mediumScreenWidth = 950;
11+
const double largeScreenWidth = 1100;
1212

1313
final birthday = DateTime(2007, 02, 18);
1414

@@ -47,13 +47,25 @@ class ResponsiveContent extends StatelessWidget {
4747
],
4848
);
4949
} else {
50-
throw "todo";
50+
body = Align(
51+
alignment: Alignment.center,
52+
child: SizedBox(
53+
width: 3 / 4 * width,
54+
child: Row(
55+
children: [
56+
Expanded(child: header),
57+
const VerticalDivider(width: 50),
58+
Expanded(child: SingleChildScrollView(child: content)),
59+
],
60+
),
61+
),
62+
);
5163
}
5264

5365
return Scaffold(
5466
body: SafeArea(
5567
child: Padding(
56-
padding: const EdgeInsets.all(8),
68+
padding: const EdgeInsets.all(!kIsWeb ? 8 : 32),
5769
child: body,
5870
),
5971
),

0 commit comments

Comments
 (0)