Skip to content

Commit 988544e

Browse files
committed
Responsive Framework Rewrite #1
- Update to support rewrite.
1 parent c0f3f0b commit 988544e

File tree

7 files changed

+26
-25
lines changed

7 files changed

+26
-25
lines changed

lib/components/blog.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ class ListItem extends StatelessWidget {
330330
* navigation links. Navigation links collapse into
331331
* a hamburger menu on screens smaller than 400px.
332332
*/
333-
class MenuBar extends StatelessWidget {
334-
const MenuBar({Key? key}) : super(key: key);
333+
class MinimalMenuBar extends StatelessWidget {
334+
const MinimalMenuBar({Key? key}) : super(key: key);
335335

336336
@override
337337
Widget build(BuildContext context) {

lib/main.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ class MyApp extends StatelessWidget {
1313
@override
1414
Widget build(BuildContext context) {
1515
return MaterialApp(
16-
builder: (context, child) => ResponsiveWrapper.builder(
17-
BouncingScrollWrapper.builder(context, child!),
18-
maxWidth: 1200,
19-
minWidth: 450,
20-
defaultScale: true,
21-
breakpoints: [
22-
const ResponsiveBreakpoint.resize(450, name: MOBILE),
23-
const ResponsiveBreakpoint.autoScale(800, name: TABLET),
24-
const ResponsiveBreakpoint.autoScale(1000, name: TABLET),
25-
const ResponsiveBreakpoint.resize(1200, name: DESKTOP),
26-
const ResponsiveBreakpoint.autoScale(2460, name: "4K"),
27-
],
28-
background: Container(color: const Color(0xFFF5F5F5))),
16+
builder: (context, child) => ResponsiveBreakpoints.builder(
17+
child: BouncingScrollWrapper.builder(context, child!),
18+
breakpoints: [
19+
const Breakpoint(
20+
start: 0,
21+
end: 450,
22+
name: MOBILE,
23+
),
24+
const Breakpoint(start: 451, end: 800, name: TABLET),
25+
const Breakpoint(start: 801, end: 1920, name: DESKTOP),
26+
const Breakpoint(start: 1921, end: double.infinity, name: '4K'),
27+
],
28+
),
2929
initialRoute: Routes.home,
3030
onGenerateRoute: (RouteSettings settings) {
3131
return Routes.fadeThrough(settings, (context) {

lib/pages/page_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ListPage extends StatelessWidget {
1919
margin: const EdgeInsets.symmetric(horizontal: 32),
2020
child: Column(
2121
children: <Widget>[
22-
const MenuBar(),
22+
const MinimalMenuBar(),
2323
const ListItem(
2424
imageUrl:
2525
"assets/images/paper_flower_overhead_bw_w1080.jpg",

lib/pages/page_post.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class PostPage extends StatelessWidget {
1212
margin: const EdgeInsets.symmetric(horizontal: 32),
1313
child: Column(
1414
children: <Widget>[
15-
const MenuBar(),
15+
const MinimalMenuBar(),
1616
const ImageWrapper(
1717
image: "assets/images/mugs_side_bw_w1080.jpg",
1818
),

lib/pages/page_typography.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TypographyPage extends StatelessWidget {
1414
margin: const EdgeInsets.symmetric(horizontal: 32),
1515
child: Column(
1616
children: <Widget>[
17-
const MenuBar(),
17+
const MinimalMenuBar(),
1818
Align(
1919
alignment: Alignment.center,
2020
child: Container(

macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import FlutterMacOS
66
import Foundation
77

8-
import path_provider_macos
8+
import path_provider_foundation
99

1010
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
1111
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))

pubspec.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
name: minimal
22
description: A minimalistic Flutter website template for blogs and portfolios.
33
version: 1.3.0
4+
publish_to: none
45

56
environment:
67
sdk: '>=2.17.0 <3.0.0'
78

89
dependencies:
910
flutter:
1011
sdk: flutter
11-
# responsive_framework:
12-
# path: ../
12+
responsive_framework:
13+
path: ../
1314
# Uncomment to build standalone project.
14-
responsive_framework: ^0.2.0
15-
google_fonts: ^2.3.2
16-
animations: ^2.0.2
15+
# responsive_framework: ^0.2.0
16+
google_fonts: ^4.0.3
17+
animations: ^2.0.7
1718
loading_gifs: ^0.3.0
1819

1920
dev_dependencies:
2021
flutter_test:
2122
sdk: flutter
22-
flutter_launcher_icons: ^0.9.2
23+
flutter_launcher_icons: ^0.12.0
2324
flutter_lints: ^2.0.1
2425

2526
flutter_icons:

0 commit comments

Comments
 (0)