mirror of
https://github.com/xvrh/lottie-flutter.git
synced 2025-08-06 16:39:36 +08:00
32 lines
649 B
Dart
32 lines
649 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lottie/lottie.dart';
|
|
|
|
void main() async {
|
|
runApp(const App());
|
|
}
|
|
|
|
class App extends StatelessWidget {
|
|
const App({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
color: Colors.lightBlue,
|
|
home: Scaffold(
|
|
backgroundColor: Colors.lightBlue,
|
|
body: Center(
|
|
child: SizedBox(
|
|
width: 300,
|
|
height: 300,
|
|
child: Lottie.asset(
|
|
'assets/LottieLogo1.json',
|
|
animate: true,
|
|
repeat: false,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|