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 {
|
2022-09-21 20:27:35 +00:00
|
|
|
const ConfigButtonItem({Key? key, this.content, this.onPressed}) : super(key: key);
|
2020-07-27 20:43:58 +00:00
|
|
|
|
2022-09-21 20:27:35 +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),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|