* started activity in chat creation * starting vocab tile display * refactor(vocab_analytics_list): made into little tiles that show the user chosen emoji * chore: comment out unused file * chore: remove unused variable * chore: make eventID nullable for constructs so users can set emoji from vocab details popup --------- Co-authored-by: ggurdin <ggurdin@gmail.com> Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
33 lines
720 B
Dart
33 lines
720 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ShrinkableText extends StatelessWidget {
|
|
final String text;
|
|
final double maxWidth;
|
|
final TextStyle? style;
|
|
|
|
const ShrinkableText({
|
|
super.key,
|
|
required this.text,
|
|
required this.maxWidth,
|
|
this.style,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return LayoutBuilder(
|
|
builder: (context, constraints) {
|
|
return Container(
|
|
constraints: BoxConstraints(maxWidth: maxWidth),
|
|
child: FittedBox(
|
|
fit: BoxFit.scaleDown,
|
|
alignment: Alignment.centerLeft,
|
|
child: Text(
|
|
text,
|
|
style: style,
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|