| Props | 8 |Types | 9 |Description | 10 |
|---|---|---|
| xs | 13 |double = 0 | 14 |Define the screen condition higher xs |
15 |
| sm | 18 |double = 600 | 19 |Define the screen condition higher or equal with sm |
20 |
| md | 23 |double = 960 | 24 |Define the screen condition higher or equal with md |
25 |
| lg | 28 |double = 1280 | 29 |Define the screen condition higher or equal with lg |
30 |
| xl | 33 |double = 1920 | 34 |Define the screen condition higher or equal with xl |
35 |
| Props | 8 |Types | 9 |Description | 10 |
|---|---|---|
| xs | 13 |int? | 14 |when the screen is on extra small break point, this order will work and used `ascending` order | 15 |
| sm | 18 |int? | 19 |when the screen is on small break point, this order will work and used `ascending` order | 20 |
| md | 23 |int? | 24 |when the screen is on medium break point, this order will work and used `ascending` order | 25 |
| lg | 28 |int? | 29 |when the screen is on large break point, this order will work and used `ascending` order | 30 |
| xl | 33 |int? | 34 |when the screen is on extra large break point, this order will work and used `ascending` order | 35 |
| Props | 8 |Types | 9 |Description | 10 |
|---|---|---|
| xs | 13 |int = 12 | 14 |The width of SpGrid Item when the screen lower or equal width SpGridSize.xs |
15 |
| sm | 18 |int? | 19 |The width of SpGrid Item when the screen lower or equal width SpGridSize.sm if it is null it will set as xs value |
20 |
| md | 23 |int? | 24 |The width of SpGrid Item when the screen lower or equal width SpGridSize.md if it is null it will set as xs value |
25 |
| lg | 28 |int? | 29 |The width of SpGrid Item when the screen lower or equal width SpGridSize.lg if it is null it will set as xs value |
30 |
| child | 33 |required Widget | 34 |Child widget inside this element tree | 35 |
| decoration | 38 |BoxDecoration? | 39 |The decoration to paint behind the child. | 40 |
| padding | 43 |EdgeInsetsGeometry? | 44 |Empty space to inscribe inside the [decoration]. The [child], if any, is placed inside this padding. | 45 |
| alignment | 48 |AlignmentGeometry? | 49 |Align the [child] within the container. | 50 |
56 |
--------------------------------------------------------------------------------
/example/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include SpGrid class
4 |
5 | | Props | 8 |Types | 9 |Description | 10 |
|---|---|---|
| width | 13 |double? | 14 |a nullable width that you can use to declare the width of grid container, if null it will following the parent width | 15 |
| height | 18 |double? | 19 |a nullable height that you can use to declare the height of grid container, if null it will following the content height | 20 |
| margin | 23 |EdgeInsetsGeometry? | 24 |Empty space to surround the decoration and child |
25 |
| padding | 28 |EdgeInsetsGeometry? | 29 |Empty space to inscribe inside the decoration. The child, if any, is placed inside this padding. |
30 |
| decoration | 33 |BoxDecoration? | 34 |The decoration to paint behind the [child]. Use the [color] property to specify a simple solid color. The [child] is not clipped to the decoration. To clip a child to the shape of a particular [ShapeDecoration], consider using a [ClipPath] widget. | 35 |
| spacing | 38 |double spacing = 0 | 39 |How much space to place between children in a run in the main axis. | 40 |
| runSpacing | 43 |double runSpacing = 0 | 44 |How much space to place between the runs themselves in the cross axis. | 45 |
| alignment | 48 |WrapAlignment alignment = WrapAlignment.start | 49 |How the children within a run should be placed in the main axis. | 50 |
| runAlignment | 53 |WrapAlignment runAlignment = WrapAlignment.start | 54 |How the runs themselves should be placed in the cross axis. | 55 |
| crossAlignment | 58 |WrapCrossAlignment crossAlignment = WrapCrossAlignment.start | 59 |How the children within a run should be aligned relative to each other in the cross axis. | 60 |
| direction | 63 |Axis direction = Axis.horizontal | 64 |The direction to use as the main axis. | 65 |
| verticalDirection | 68 |VerticalDirection verticalDirection = VerticalDirection.down | 69 |Determines the order to lay children out vertically and how to interpret start and end in the vertical direction. | 70 |
| textDirection | 73 |TextDirection? | 74 |Determines the order to lay children out horizontally and how to interpret start and end in the horizontal direction. | 75 |
| children | 78 |required List |
79 | More information here | 80 |
| gridSize | 83 |SpGridSize? | 84 |More information here | 85 |
16 |
17 | #### Order Demo
18 |
19 | code example here
20 |
21 |
22 | #### Grid Explanation
23 |
24 | Bootstrap, material-ui or another web-grid always use 12 size. Here is the image example:
25 |
26 |
27 | ## Classes
28 |
29 | There are 4 classes that you have to now, these are:
30 |
31 | 1. SpGrid is the container of grid, more information here
32 | 2. SpGridItem is the children of SpGrid, more information here
33 | 3. SpGridSize is the class that you can declare the maximum of the **screen** size, more information here
34 | 4. SpOrder, this class is a sort class. when you use 1 of it's value, the value will create an ordering when the screen on the value condition. more information here
35 |
36 | ## Example
37 |
38 | ```dart
39 | SpGrid(width: MediaQuery.of(context).size.width, children: [
40 | SpGridItem(
41 | xs: 12,
42 | sm: 6,
43 | md: 4,
44 | lg: 3,
45 | child: Container(
46 | color: Colors.blue,
47 | height: 200,
48 | ),
49 | ),
50 | SpGridItem(
51 | xs: 12,
52 | sm: 6,
53 | md: 4,
54 | lg: 3,
55 | child: Container(
56 | color: Colors.green,
57 | height: 200,
58 | ),
59 | ),
60 | SpGridItem(
61 | xs: 12,
62 | sm: 6,
63 | md: 4,
64 | lg: 3,
65 | child: Container(
66 | color: Colors.yellow,
67 | height: 200,
68 | ),
69 | ),
70 | SpGridItem(
71 | xs: 12,
72 | sm: 6,
73 | md: 4,
74 | lg: 3,
75 | child: Container(
76 | color: Colors.purple,
77 | height: 200,
78 | ),
79 | ),
80 | ]);
81 | ```
82 |
83 | ## Order Example
84 |
85 | ```dart
86 | import 'package:flutter/material.dart';
87 | import 'package:simple_grid/simple_grid.dart';
88 |
89 | void main() {
90 | runApp(MyApp());
91 | }
92 |
93 | class MyApp extends StatelessWidget {
94 | @override
95 | Widget build(BuildContext context) {
96 | return MaterialApp(
97 | title: 'Simple_grid',
98 | theme: ThemeData(
99 | brightness: Brightness.dark,
100 | ),
101 | home: MyHomePage(),
102 | );
103 | }
104 | }
105 |
106 | class MyHomePage extends StatelessWidget {
107 | @override
108 | Widget build(BuildContext context) {
109 | return Scaffold(
110 | appBar: AppBar(
111 | title: Text("SIMPLE GRID EXAMPLE"),
112 | ),
113 | body: SpGrid(
114 | width: MediaQuery.of(context).size.width,
115 | spacing: 10,
116 | runSpacing: 10,
117 | children: [
118 | SpGridItem(
119 | xs: 12,
120 | md: 6,
121 | order: SpOrder(sm: 1, xs: 1),
122 | child: Container(
123 | height: 200,
124 | child: Column(
125 | mainAxisAlignment: MainAxisAlignment.center,
126 | children: [
127 | Text(
128 | "Hello!",
129 | style: TextStyle(fontSize: 40),
130 | textAlign: TextAlign.center,
131 | ),
132 | SizedBox(
133 | height: 10,
134 | ),
135 | Text(
136 | "I'm John Doe and I Love Programming",
137 | style: TextStyle(fontSize: 25),
138 | textAlign: TextAlign.center,
139 | ),
140 | ],
141 | ),
142 | ),
143 | ),
144 | SpGridItem(
145 | xs: 12,
146 | md: 6,
147 | order: SpOrder(sm: 0, xs: 0),
148 | child: Container(
149 | height: 200,
150 | decoration: BoxDecoration(
151 | image: DecorationImage(
152 | image: NetworkImage(
153 | "https://raw.githubusercontent.com/nggepe/simple_grid/master/doc/john.png"))),
154 | ),
155 | ),
156 | ],
157 | ),
158 | );
159 | }
160 | }
161 | ```
162 |
163 | # Customize Break Point
164 |
165 |
166 |
167 | ```dart
168 | SpGrid(
169 | width: MediaQuery.of(context).size.width,
170 | gridSize: SpGridSize(xs: 0, sm: 500, md: 768, lg: 980, xl: 1200),
171 | children:[],
172 | )
173 | ```
174 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | fake_async:
45 | dependency: transitive
46 | description:
47 | name: fake_async
48 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.3.1"
52 | flutter:
53 | dependency: "direct main"
54 | description: flutter
55 | source: sdk
56 | version: "0.0.0"
57 | flutter_test:
58 | dependency: "direct dev"
59 | description: flutter
60 | source: sdk
61 | version: "0.0.0"
62 | leak_tracker:
63 | dependency: transitive
64 | description:
65 | name: leak_tracker
66 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
67 | url: "https://pub.dev"
68 | source: hosted
69 | version: "10.0.5"
70 | leak_tracker_flutter_testing:
71 | dependency: transitive
72 | description:
73 | name: leak_tracker_flutter_testing
74 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
75 | url: "https://pub.dev"
76 | source: hosted
77 | version: "3.0.5"
78 | leak_tracker_testing:
79 | dependency: transitive
80 | description:
81 | name: leak_tracker_testing
82 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
83 | url: "https://pub.dev"
84 | source: hosted
85 | version: "3.0.1"
86 | matcher:
87 | dependency: transitive
88 | description:
89 | name: matcher
90 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
91 | url: "https://pub.dev"
92 | source: hosted
93 | version: "0.12.16+1"
94 | material_color_utilities:
95 | dependency: transitive
96 | description:
97 | name: material_color_utilities
98 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
99 | url: "https://pub.dev"
100 | source: hosted
101 | version: "0.11.1"
102 | meta:
103 | dependency: transitive
104 | description:
105 | name: meta
106 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
107 | url: "https://pub.dev"
108 | source: hosted
109 | version: "1.15.0"
110 | path:
111 | dependency: transitive
112 | description:
113 | name: path
114 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
115 | url: "https://pub.dev"
116 | source: hosted
117 | version: "1.9.0"
118 | sky_engine:
119 | dependency: transitive
120 | description: flutter
121 | source: sdk
122 | version: "0.0.99"
123 | source_span:
124 | dependency: transitive
125 | description:
126 | name: source_span
127 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
128 | url: "https://pub.dev"
129 | source: hosted
130 | version: "1.10.0"
131 | stack_trace:
132 | dependency: transitive
133 | description:
134 | name: stack_trace
135 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
136 | url: "https://pub.dev"
137 | source: hosted
138 | version: "1.11.1"
139 | stream_channel:
140 | dependency: transitive
141 | description:
142 | name: stream_channel
143 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
144 | url: "https://pub.dev"
145 | source: hosted
146 | version: "2.1.2"
147 | string_scanner:
148 | dependency: transitive
149 | description:
150 | name: string_scanner
151 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
152 | url: "https://pub.dev"
153 | source: hosted
154 | version: "1.2.0"
155 | term_glyph:
156 | dependency: transitive
157 | description:
158 | name: term_glyph
159 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
160 | url: "https://pub.dev"
161 | source: hosted
162 | version: "1.2.1"
163 | test_api:
164 | dependency: transitive
165 | description:
166 | name: test_api
167 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
168 | url: "https://pub.dev"
169 | source: hosted
170 | version: "0.7.2"
171 | vector_math:
172 | dependency: transitive
173 | description:
174 | name: vector_math
175 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
176 | url: "https://pub.dev"
177 | source: hosted
178 | version: "2.1.4"
179 | vm_service:
180 | dependency: transitive
181 | description:
182 | name: vm_service
183 | sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
184 | url: "https://pub.dev"
185 | source: hosted
186 | version: "14.2.5"
187 | sdks:
188 | dart: ">=3.3.0 <4.0.0"
189 | flutter: ">=3.18.0-18.0.pre.54"
190 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "2.11.0"
12 | boolean_selector:
13 | dependency: transitive
14 | description:
15 | name: boolean_selector
16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.1.1"
20 | characters:
21 | dependency: transitive
22 | description:
23 | name: characters
24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "1.3.0"
28 | clock:
29 | dependency: transitive
30 | description:
31 | name: clock
32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.1.1"
36 | collection:
37 | dependency: transitive
38 | description:
39 | name: collection
40 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.18.0"
44 | cupertino_icons:
45 | dependency: "direct main"
46 | description:
47 | name: cupertino_icons
48 | sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.0.8"
52 | fake_async:
53 | dependency: transitive
54 | description:
55 | name: fake_async
56 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
57 | url: "https://pub.dev"
58 | source: hosted
59 | version: "1.3.1"
60 | flutter:
61 | dependency: "direct main"
62 | description: flutter
63 | source: sdk
64 | version: "0.0.0"
65 | flutter_lints:
66 | dependency: "direct dev"
67 | description:
68 | name: flutter_lints
69 | sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
70 | url: "https://pub.dev"
71 | source: hosted
72 | version: "2.0.3"
73 | flutter_test:
74 | dependency: "direct dev"
75 | description: flutter
76 | source: sdk
77 | version: "0.0.0"
78 | leak_tracker:
79 | dependency: transitive
80 | description:
81 | name: leak_tracker
82 | sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
83 | url: "https://pub.dev"
84 | source: hosted
85 | version: "10.0.5"
86 | leak_tracker_flutter_testing:
87 | dependency: transitive
88 | description:
89 | name: leak_tracker_flutter_testing
90 | sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
91 | url: "https://pub.dev"
92 | source: hosted
93 | version: "3.0.5"
94 | leak_tracker_testing:
95 | dependency: transitive
96 | description:
97 | name: leak_tracker_testing
98 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
99 | url: "https://pub.dev"
100 | source: hosted
101 | version: "3.0.1"
102 | lints:
103 | dependency: transitive
104 | description:
105 | name: lints
106 | sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
107 | url: "https://pub.dev"
108 | source: hosted
109 | version: "2.1.1"
110 | matcher:
111 | dependency: transitive
112 | description:
113 | name: matcher
114 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
115 | url: "https://pub.dev"
116 | source: hosted
117 | version: "0.12.16+1"
118 | material_color_utilities:
119 | dependency: transitive
120 | description:
121 | name: material_color_utilities
122 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
123 | url: "https://pub.dev"
124 | source: hosted
125 | version: "0.11.1"
126 | meta:
127 | dependency: transitive
128 | description:
129 | name: meta
130 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
131 | url: "https://pub.dev"
132 | source: hosted
133 | version: "1.15.0"
134 | path:
135 | dependency: transitive
136 | description:
137 | name: path
138 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
139 | url: "https://pub.dev"
140 | source: hosted
141 | version: "1.9.0"
142 | simple_grid:
143 | dependency: "direct main"
144 | description:
145 | path: ".."
146 | relative: true
147 | source: path
148 | version: "0.1.5"
149 | sky_engine:
150 | dependency: transitive
151 | description: flutter
152 | source: sdk
153 | version: "0.0.99"
154 | source_span:
155 | dependency: transitive
156 | description:
157 | name: source_span
158 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
159 | url: "https://pub.dev"
160 | source: hosted
161 | version: "1.10.0"
162 | stack_trace:
163 | dependency: transitive
164 | description:
165 | name: stack_trace
166 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
167 | url: "https://pub.dev"
168 | source: hosted
169 | version: "1.11.1"
170 | stream_channel:
171 | dependency: transitive
172 | description:
173 | name: stream_channel
174 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
175 | url: "https://pub.dev"
176 | source: hosted
177 | version: "2.1.2"
178 | string_scanner:
179 | dependency: transitive
180 | description:
181 | name: string_scanner
182 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
183 | url: "https://pub.dev"
184 | source: hosted
185 | version: "1.2.0"
186 | term_glyph:
187 | dependency: transitive
188 | description:
189 | name: term_glyph
190 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
191 | url: "https://pub.dev"
192 | source: hosted
193 | version: "1.2.1"
194 | test_api:
195 | dependency: transitive
196 | description:
197 | name: test_api
198 | sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
199 | url: "https://pub.dev"
200 | source: hosted
201 | version: "0.7.2"
202 | vector_math:
203 | dependency: transitive
204 | description:
205 | name: vector_math
206 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
207 | url: "https://pub.dev"
208 | source: hosted
209 | version: "2.1.4"
210 | vm_service:
211 | dependency: transitive
212 | description:
213 | name: vm_service
214 | sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
215 | url: "https://pub.dev"
216 | source: hosted
217 | version: "14.2.5"
218 | sdks:
219 | dart: ">=3.3.0 <4.0.0"
220 | flutter: ">=3.18.0-18.0.pre.54"
221 |
--------------------------------------------------------------------------------
/lib/simple_grid.dart:
--------------------------------------------------------------------------------
1 | library simple_grid;
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:simple_grid/src/sp_order.dart';
5 | export 'package:simple_grid/src/sp_order.dart';
6 |
7 | class SpGrid extends StatelessWidget {
8 | ///a nullable width that you can use to declare the width of grid container, if null it will following the parent width
9 | final double? width;
10 |
11 | ///Empty space to inscribe inside the decoration. The child, if any, is placed inside this padding.
12 | final EdgeInsetsGeometry? padding;
13 |
14 | ///Empty space to surround the decoration and child
15 | final EdgeInsetsGeometry? margin;
16 |
17 | ///a nullable height that you can use to declare the height of grid container, if null it will following the content height
18 | final double? height;
19 |
20 | /// 12 row declaration with screen explanation
21 | final List