mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-08-23 14:01:14 +08:00
27 lines
657 B
Dart
27 lines
657 B
Dart
import 'package:bmi_calculator/calculator/calculator_page.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
void main() {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
// Prevent landscape orientation
|
|
SystemChrome.setPreferredOrientations([
|
|
DeviceOrientation.portraitUp,
|
|
]);
|
|
runApp(const MyApp());
|
|
}
|
|
|
|
class MyApp extends StatelessWidget {
|
|
const MyApp({Key? key}) : super(key: key);
|
|
|
|
// This widget is the root of your application.
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'BMI Calculator',
|
|
home: CalculatorPage(title: 'BMI CALCULATOR'),
|
|
);
|
|
}
|
|
}
|