描述
这个包将任何 Flutter 组件包裹在具有指定颜色的容器内。
特色图片
入门
将以下内容添加到您的 pubspec.yaml 文件中。
dependencies:
coloredcontainer: 0.0.1
导入包。
import 'package:coloredcontainer/coloredcontainer.dart';
用法
使用 ColoredContainer 组件包裹任何组件。默认情况下,它将 ColoredContainer 颜色设置为 Colors.blue,但您可以根据需要通过传递参数来指定任何颜色。
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child: ColoredContainer(
child: Text("Text"),
),
),
);
}
许可证
MIT License
Copyright (c) 2022 Vijay R
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.
附加信息
想了解更多关于 Flutter 的精彩内容,
请访问我的频道?:https://www.youtube.com/c/vijaycreationsflutter
