-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
fleet_imports
package (#51)
- Loading branch information
Showing
17 changed files
with
450 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Copyright 2023 Gabriel Terwesten | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Alternative imports for Flutter libraries (`widgets`, `material` and | ||
`cupertino`), that substitute widgets for which Fleet provides drop-in | ||
replacements. | ||
|
||
By using these imports, you can use Fleet's widgets without having to change | ||
your code. | ||
|
||
## Usage | ||
|
||
Add a dependency on `fleet_imports` by running `dart pub add fleet_imports` in | ||
your project's root directory. | ||
|
||
Then, in your Dart code, replace the imports of `package:flutter` libraries with | ||
the corresponding library from `package:fleet_imports`: | ||
|
||
```diff | ||
-import 'package:flutter/material.dart'; | ||
+import 'package:fleet_imports/flutter/material.dart'; | ||
``` | ||
|
||
If you are importing a combination of the `widgets`, `material` and `cupertino` | ||
libraries in a file, you have to switch all of them to the corresponding | ||
`fleet_imports` library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import 'package:fleet/fleet.dart'; | ||
|
||
export 'package:flutter/cupertino.dart' | ||
hide | ||
Align, | ||
Center, | ||
ColoredBox, | ||
Column, | ||
Container, | ||
Flex, | ||
Opacity, | ||
Padding, | ||
Positioned, | ||
PositionedDirectional, | ||
Row, | ||
SizedBox, | ||
SliverOpacity, | ||
SliverPadding, | ||
Transform; | ||
|
||
/// Fleet drop-in replacement for [Align]. | ||
typedef Align = FleetAlign; | ||
|
||
/// Fleet drop-in replacement for [Center]. | ||
typedef Center = FleetCenter; | ||
|
||
/// Fleet drop-in replacement for [ColoredBox]. | ||
typedef ColoredBox = FleetColoredBox; | ||
|
||
/// Fleet drop-in replacement for [Column]. | ||
typedef Column = FleetColumn; | ||
|
||
/// Fleet drop-in replacement for [Container]. | ||
typedef Container = FleetContainer; | ||
|
||
/// Fleet drop-in replacement for [Flex]. | ||
typedef Flex = FleetFlex; | ||
|
||
/// Fleet drop-in replacement for [Opacity]. | ||
typedef Opacity = FleetOpacity; | ||
|
||
/// Fleet drop-in replacement for [Padding]. | ||
typedef Padding = FleetPadding; | ||
|
||
/// Fleet drop-in replacement for [Positioned]. | ||
typedef Positioned = FleetPositioned; | ||
|
||
/// Fleet drop-in replacement for [PositionedDirectional]. | ||
typedef PositionedDirectional = FleetPositionedDirectional; | ||
|
||
/// Fleet drop-in replacement for [Row]. | ||
typedef Row = FleetRow; | ||
|
||
/// Fleet drop-in replacement for [SizedBox]. | ||
typedef SizedBox = FleetSizedBox; | ||
|
||
/// Fleet drop-in replacement for [SliverOpacity]. | ||
typedef SliverOpacity = FleetSliverOpacity; | ||
|
||
/// Fleet drop-in replacement for [SliverPadding]. | ||
typedef SliverPadding = FleetSliverPadding; | ||
|
||
/// Fleet drop-in replacement for [Transform]. | ||
typedef Transform = FleetTransform; |
Oops, something went wrong.