mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-01-19 03:40:39 +00:00
35 lines
910 B
Dart
35 lines
910 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lightmeter/res/dimens.dart';
|
|
|
|
class IconPlaceholder extends StatelessWidget {
|
|
final IconData icon;
|
|
final String text;
|
|
|
|
const IconPlaceholder({
|
|
required this.icon,
|
|
required this.text,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ConstrainedBox(
|
|
constraints: BoxConstraints(maxWidth: MediaQuery.sizeOf(context).width / 2),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(
|
|
icon,
|
|
color: Theme.of(context).colorScheme.onSurface,
|
|
),
|
|
const SizedBox(height: Dimens.grid8),
|
|
Text(
|
|
text,
|
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: Theme.of(context).colorScheme.onSurface),
|
|
textAlign: TextAlign.center,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|