dialog_switcher 0.0.4 dialog_switcher: ^0.0.4 copied to clipboard
Allows user to switch widgets gracefully within a dialog with Animation.
import 'package:dialog_switcher/dialog_switcher.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'DialogSwitcher',
debugShowCheckedModeBanner: false,
home: SafeArea(
child: Scaffold(
body: Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Sample Usage",
style: TextStyle(fontSize: 20),
),
DialogSwitcher(
dialogBackgroundColor: Colors.transparent,
dialogElevation: 0,
frontChild: Container(
width: 300,
height: 300,
color: Colors.amber,
),
backChild: Container(
width: 300,
height: 300,
color: Colors.pinkAccent,
),
),
],
),
),
),
),
);
}
}