circular_page_transition 0.0.2
circular_page_transition: ^0.0.2 copied to clipboard
A beautiful and highly customizable circular reveal page transition for Flutter applications.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:circular_page_transition/circular_page_transition.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(home: FirstScreen());
}
}
class FirstScreen extends StatelessWidget {
const FirstScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('الشاشة الأولى')),
body: Center(
child: ElevatedButton(
onPressed: () {
Navigator.of(
context,
).push(createCircularRevealTransition(page: const SecondScreen()));
},
child: const Text('انتقل للشاشة الثانية'),
),
),
);
}
}
class SecondScreen extends StatelessWidget {
const SecondScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('الشاشة الثانية'),
backgroundColor: Colors.blueAccent,
),
body: const Center(
child: Text(
'تم الانتقال بنجاح!',
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
),
);
}
}