mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-11-09 04:58:58 +00:00
BMI calculator example (#130)
This commit is contained in:
26
bmi_calculator/lib/main.dart
Normal file
26
bmi_calculator/lib/main.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
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'),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user