import 'package:flutter/material.dart'; import 'device_type.dart'; class InlineRowWidget extends StatelessWidget { final List children; const InlineRowWidget({super.key, required this.children}); @override Widget build(BuildContext context) { return IntrinsicWidth( child: Row( children: children, ), ); } } class AlignWrapWidget extends StatelessWidget { final List children; const AlignWrapWidget({super.key, required this.children}); @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.symmetric(vertical: 10), child: Align( alignment: Alignment.centerLeft, child: Wrap( children: children, ), ), ); } } // ignore: must_be_immutable class FixedWidthTextWidget extends StatelessWidget { final String text; final double width; final TextStyle? style; FixedWidthTextWidget({ super.key, required this.text, this.width = 80, this.style, }); TextStyle? textStyle; @override Widget build(BuildContext context) { final deviceType = getDeviceType(context); double dynamicWidth = deviceType == DeviceType.mobile ? 0 : 50; if (style != null) { textStyle = style!.copyWith(fontSize: deviceType == DeviceType.mobile ? 16 : 20); } else { textStyle = TextStyle(fontSize: deviceType == DeviceType.mobile ? 16 : 20); } return Container( margin: const EdgeInsets.symmetric(horizontal: 3), width: width + dynamicWidth, child: Text( text, style: textStyle, ), ); } }