parallax_sensors_bg 1.0.1 parallax_sensors_bg: ^1.0.1 copied to clipboard
Flutter package to simplify giving a parallax effect in the background of a page that responds to a corresponding sensor detection.
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'example1.dart';
import 'example2.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
overlays: [SystemUiOverlay.bottom]);
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
.then((_) {
runApp(const MyApp());
});
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const Example1(),
//const Example2(),
);
}
}