1234567891011121314151617181920212223242526272829 |
- import 'package:douyin_demo/widgets/FavAnimation.dart';
- import 'package:flutter/material.dart';
- class IconText extends StatelessWidget {
- const IconText({Key? key,required this.icon,required this.text}) : super(key: key);
- final AnimatedIconWidget icon;
- final String text;
- @override
- Widget build(BuildContext context) {
- double rpx = MediaQuery.of(context).size.width / 750;
- return Container(
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- icon,
- Container(
- // alignment: Alignment.center,
- child: Text(
- text,
- style: TextStyle(color: Colors.white, fontSize: 25 * rpx),
- )),
- ],
- ),
- );
- }
- }
|