fullscreen_wake_screen 0.0.1
fullscreen_wake_screen: ^0.0.1 copied to clipboard
A Flutter plugin to show full-screen wake screens (incoming calls, alarms, ride accept).
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:fullscreen_wake_screen/fullscreen_wake_screen.dart';
void main() {
runApp(MaterialApp(
initialRoute: '/',
routes: {
'/': (_) => const HomePage(),
'/incoming_call': (_) => const IncomingCallScreen(),
},
));
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ElevatedButton(
onPressed: () {
FullscreenWakeScreen.show(route: '/incoming_call');
},
child: const Text("Simulate Call"),
),
),
);
}
}
class IncomingCallScreen extends StatelessWidget {
const IncomingCallScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.blue[100],
body: const Center(
child: Text("Incoming Call Screen", style: TextStyle(fontSize: 24)),
),
);
}
}