mobile_nebula/lib/components/config/ConfigButtonItem.dart

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
816 B
Dart
Raw Permalink Normal View History

2020-07-27 20:43:58 +00:00
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mobile_nebula/components/SpecialButton.dart';
import 'package:mobile_nebula/services/utils.dart';
// A config item that detects tapping and calls back on a tap
class ConfigButtonItem extends StatelessWidget {
const ConfigButtonItem({Key? key, this.content, this.onPressed}) : super(key: key);
2020-07-27 20:43:58 +00:00
final Widget? content;
2020-07-27 20:43:58 +00:00
final onPressed;
@override
Widget build(BuildContext context) {
return SpecialButton(
color: Utils.configItemBackground(context),
onPressed: onPressed,
useButtonTheme: true,
child: Container(
constraints: BoxConstraints(minHeight: Utils.minInteractiveSize, minWidth: double.infinity),
child: Center(child: content),
));
}
}