LibAC-flutter/lib/tests/alert.dart
2025-01-31 14:23:15 -07:00

31 lines
884 B
Dart

import 'dart:io';
import 'package:flutter/material.dart';
import 'package:libacflutter/Alert.dart';
import 'package:libacflutter/Constants.dart';
class TestAlert extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Alert Dialog Null Callback Test"),
backgroundColor: LibACFlutterConstants.TITLEBAR_COLOR),
body: Center(
child: ElevatedButton(
onPressed: () async {
await showAdaptiveDialog(
context: context,
builder: (builder) {
return Alert(
title: "Test Alert",
body: "This is a test that you can ignore");
});
exit(0);
},
child: Text("Test Null Alert")),
),
);
}
}