LibAC-flutter/lib/tests/alert.dart
2025-03-15 02:23:52 -07:00

33 lines
917 B
Dart

import 'dart:io';
import 'package:flutter/material.dart';
import 'package:libacflutter/Alert.dart';
import 'package:libacflutter/Constants.dart';
class TestAlert extends StatelessWidget {
const TestAlert({super.key});
@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")),
),
);
}
}