Skip to content

Commit 295f9f3

Browse files
committed
Merge branch 'release/0.5.0'
2 parents 46d3bc1 + 18599c2 commit 295f9f3

14 files changed

+97
-147
lines changed

CHANGELOG.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,59 @@
11
# Changelog
22

3-
## [0.4.4]
3+
## 0.5.0
4+
5+
* Updated to NNBD
6+
7+
## 0.4.4
48

59
* Update homepage link
610

7-
## [0.4.3]
11+
## 0.4.3
812

913
* Migrated to GitHub
1014
* Minor refactorings
1115

12-
## [0.4.2]
16+
## 0.4.2
1317

1418
* Updated license file
1519
* Added license file headings
1620

17-
## [0.4.1]
21+
## 0.4.1
1822

1923
* Updated pedantic dependency
2024
* Minor changes due to linter
2125

22-
## [0.4.0]
26+
## 0.4.0
2327

2428
* Redesigned orientation usage for `getScreenSize` and `getContextualScreenSize`
2529
* Added null checks for `getMobileLayoutSize`, `getTabletLayoutSize`, `getScreenSize` and `getContextualScreenSize`
2630
* Fixed `README.md`
2731

28-
## [0.3.2]
32+
## 0.3.2
2933

3034
* Added descriptions for `getMobileLayoutSize`, `getTabletLayoutSize`, `getScreenSize` and `getContextualScreenSize`
3135
* Minor fixes
3236

33-
## [0.3.1]
37+
## 0.3.1
3438

3539
* Added global `getMobileLayoutSize`, `getTabletLayoutSize` and two variations of `getScreenSize` based on `width` and `getContextualScreenSize` based on `BuildContext`
3640
* Moved `orientation` from parameter of builder to `ScreenSize` as parameter
3741

38-
## [0.3.0]
42+
## 0.3.0
3943

4044
* Redesigned `LayoutSize`, `ScreenSizeSettings`, `ResponsiveLayoutBuilder`
4145
* Added `MobileLayoutSize`, `TabletLayoutSize` and `ScreenSize`
4246

43-
## [0.2.1]
47+
## 0.2.1
4448

4549
* Added `analysis_option.yaml`
4650

47-
## [0.2.0]
51+
## 0.2.0
4852

4953
* Added flag for usage of `Device Screen Size` or `All Available Screen Space`
5054
* Added sample of usage of `ResponsiveLayoutBuilder` widget
5155

52-
## [0.1.0]
56+
## 0.1.0
5357

5458
* Created `LayoutSize`, `ScreenSizeSettings`, `ResponsiveLayoutBuilder`
5559
* Created `Example`

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2020, MarchDev Toolkit
3+
Copyright (c) 2021, MarchDev Toolkit
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#!/bin/sh
22
# This is a generated file; do not edit or check into version control.
3-
export "FLUTTER_ROOT=C:\Programming\flutter"
4-
export "FLUTTER_APPLICATION_PATH=C:\Programming\Projects\Repositories\Mine\responsive_layout_builder\example"
3+
export "FLUTTER_ROOT=D:\Programming\flutter"
4+
export "FLUTTER_APPLICATION_PATH=D:\Projects\Repository\march.dev.tk\responsive_layout_builder\example"
55
export "FLUTTER_TARGET=lib\main.dart"
66
export "FLUTTER_BUILD_DIR=build"
77
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
8-
export "FLUTTER_FRAMEWORK_DIR=C:\Programming\flutter\bin\cache\artifacts\engine\ios"
98
export "FLUTTER_BUILD_NAME=1.0.0"
109
export "FLUTTER_BUILD_NUMBER=1"
10+
export "DART_OBFUSCATION=false"
11+
export "TRACK_WIDGET_CREATION=false"
12+
export "TREE_SHAKE_ICONS=false"
13+
export "PACKAGE_CONFIG=.packages"

example/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020, the MarchDev Toolkit project authors. Please see the AUTHORS file
1+
// Copyright (c) 2021, the MarchDev Toolkit project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

@@ -50,10 +50,10 @@ class _MyAppState extends State<MyApp> {
5050
Text('Layout Size: ${layoutSizeEnumToString[size.size]}'),
5151
if (size.mobile != null)
5252
Text(
53-
'Mobile Size: ${mobileLayoutSizeEnumToString[size.mobile]}'),
53+
'Mobile Size: ${mobileLayoutSizeEnumToString[size.mobile!]}'),
5454
if (size.tablet != null)
5555
Text(
56-
'Tablet Size: ${tabletLayoutSizeEnumToString[size.tablet]}'),
56+
'Tablet Size: ${tabletLayoutSizeEnumToString[size.tablet!]}'),
5757
],
5858
),
5959
),

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: Oleh Marchenko <oleh.marchenko.95@gmail.com>
33
description: Demonstrates how to use the responsive_layout_builder package.
44

55
environment:
6-
sdk: ">=2.2.2 <3.0.0"
6+
sdk: '>=2.12.0 <3.0.0'
77

88
dependencies:
99
flutter:

lib/responsive_layout_builder.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// Copyright (c) 2020, the MarchDev Toolkit project authors. Please see the AUTHORS file
1+
// Copyright (c) 2021, the MarchDev Toolkit project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

55
library responsive_layout_builder;
66

7-
export 'src/screen_size.dart';
87
export 'src/layout_size.dart';
9-
export 'src/size_calculations.dart';
10-
export 'src/screen_size_settings.dart';
118
export 'src/responsive_layout_builder.dart';
9+
export 'src/screen_size.dart';
10+
export 'src/screen_size_settings.dart';
11+
export 'src/size_calculations.dart';

lib/src/layout_size.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020, the MarchDev Toolkit project authors. Please see the AUTHORS file
1+
// Copyright (c) 2021, the MarchDev Toolkit project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

lib/src/responsive_layout_builder.dart

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// Copyright (c) 2020, the MarchDev Toolkit project authors. Please see the AUTHORS file
1+
// Copyright (c) 2021, the MarchDev Toolkit project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'package:flutter/widgets.dart';
66

7-
import 'package:responsive_layout_builder/src/layout_size.dart';
8-
import 'package:responsive_layout_builder/src/screen_size.dart';
9-
import 'package:responsive_layout_builder/src/screen_size_settings.dart';
10-
import 'package:responsive_layout_builder/src/size_calculations.dart';
7+
import 'layout_size.dart';
8+
import 'screen_size.dart';
9+
import 'screen_size_settings.dart';
10+
import 'size_calculations.dart';
1111

1212
/// Signature for a function that builds a widget given an [LayoutSize].
1313
///
@@ -23,15 +23,12 @@ class ResponsiveLayoutBuilder extends StatefulWidget {
2323
///
2424
/// The [builder], [portraitSizes] and [landscapeSizes] argument must not be null.
2525
const ResponsiveLayoutBuilder({
26-
Key key,
27-
@required this.builder,
26+
Key? key,
27+
required this.builder,
2828
this.defaultSize = LayoutSize.mobile,
2929
this.portraitSizes = const ScreenSizeSettings.portrait(),
3030
this.landscapeSizes = const ScreenSizeSettings.landscape(),
31-
}) : assert(builder != null),
32-
assert(portraitSizes != null),
33-
assert(landscapeSizes != null),
34-
super(key: key);
31+
}) : super(key: key);
3532

3633
/// Builds the widgets below this widget given this widget's [LayoutSize]
3734
final ResponsiveLayoutWidgetBuilder builder;

lib/src/screen_size.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
// Copyright (c) 2020, the MarchDev Toolkit project authors. Please see the AUTHORS file
1+
// Copyright (c) 2021, the MarchDev Toolkit project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'package:flutter/widgets.dart';
6-
import 'package:responsive_layout_builder/src/layout_size.dart';
6+
7+
import 'layout_size.dart';
78

89
/// [ScreenSize] stores data of [LayoutSize], [MobileLayoutSize] and [TabletLayoutSize]
910
class ScreenSize {
1011
/// Creates an instance of [ScreenSize] that stores data of [LayoutSize], [MobileLayoutSize] and [TabletLayoutSize]
1112
const ScreenSize({
12-
@required this.size,
13+
required this.size,
1314
this.mobile,
1415
this.tablet,
1516
this.orientation,
16-
}) : assert(size != null);
17+
});
1718

1819
/// [size] is used for storing general screen type
1920
///
@@ -23,15 +24,15 @@ class ScreenSize {
2324
/// [mobile] defines mobile screen type
2425
///
2526
/// Could be [MobileLayoutSize.small], [MobileLayoutSize.medium] or [MobileLayoutSize.large]
26-
final MobileLayoutSize mobile;
27+
final MobileLayoutSize? mobile;
2728

2829
/// [tablet] defines mobile screen type
2930
///
3031
/// Could be [TabletLayoutSize.small] or [TabletLayoutSize.large]
31-
final TabletLayoutSize tablet;
32+
final TabletLayoutSize? tablet;
3233

3334
/// [orientation] defines screen orientation
3435
///
3536
/// Could be [Orientation.landscape] or [Orientation.portrait]
36-
final Orientation orientation;
37+
final Orientation? orientation;
3738
}

lib/src/screen_size_settings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020, the MarchDev Toolkit project authors. Please see the AUTHORS file
1+
// Copyright (c) 2021, the MarchDev Toolkit project authors. Please see the AUTHORS file
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

0 commit comments

Comments
 (0)