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 ↗