m3_lightmeter/lib/screens/shared/icon_placeholder/widget_icon_placeholder.dart
Vadim fb58b6cd9f
Upgrade project to the latest stable Flutter version (#201)
* fixed fvm path typo

* Update pubspec.yaml

* version control pubspec.lock

* fixed ios build

* deleted `ExpandableSectionList`

* removed redundant default cases

* avoided async gaps

* replaced deprecated color value getter

* `WillPopScope` -> `PopScope`

* removed theme deprecations

* replaced text scale deprecation

* updated goldens

* updated flutter version across workflows

* [android] migrated to the new gradle

* upgraded dependencies

* [android] fixed build

* [ios] fixed build

* updated config

* allow release notes to fail

* updated stub pubspec

* [android] use java 17

* [ios] enable flutterfire

* added firebase.json to secrets

* typo

* update color utils

* use exact versions

* reverted color utils

* updated goldens
2025-01-20 19:32:57 +01:00

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,
),
],
),
);
}
}