dynamicutils
用於從 Figma、XD 等工具建立響應式設計的 Flutter 套件.....
MohamedAshraf701/dynamic_size open-source repository details.
以下為英文專案原文快照,最新內容請造訪 GitHub。
A Flutter package that provides dynamic sizing capabilities, allowing you to adapt your UI elements to different screen sizes.
Add the following line to your pubspec.yaml file:
dependencies:
dynamicutils: <latest_version>
Then run flutter pub get to fetch the package.
Import the package into your Dart file:
import 'package:dynamicutils/dynamicutils.dart';
Initialize the DynamicSize class with the design screen size:
DynamicSize size = DynamicSize(849, 393);
Adjust the height and width of your UI elements:
DynamicSize size = DynamicSize(849, 393);
height = size.height(20);
width = size.width(20);
size.HeightSpace(20);
size.WidthSpace(20);
Create a new dynamic container:
dContainer(
height: 20,
width: 20,
);
For navigation:
pop(context);
newScreen(context, screen());
replaceScreen(context, screen());
For more advanced usage and customization options, refer to the package's API documentation.
You can find more usage examples in the example folder of this repository.
This project is licensed under the MIT License.
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
If you have any questions, feel free to reach out:
依賴清單 2 項
{"sdk":"flutter"}{"sdk":"flutter"}先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗