Maximum Number Value Between Two Numbers
Complete Code For Maximum Number Value Between Two Numbers In Flutter
Main.dart
import 'package:flutter/material.dart'; import 'dart:math'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { int Number_A = 220; int Number_B = 330; int Number_C; findMaxBetweenTwoValues() { Number_C = max(Number_A, Number_B); print(Number_C); } @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( appBar: AppBar( backgroundColor: Colors.lightGreen, title: Text("Maximum Value Between 2 Numbers"), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Container( margin: const EdgeInsets.fromLTRB(20, 10, 20, 10), child: RaisedButton( onPressed: () => findMaxBetweenTwoValues(), child: Text(' Find Maximum Value Between 2 Numbers '), textColor: Colors.white, color: Color(0xFFFFC107), padding: EdgeInsets.fromLTRB(10, 10, 10, 10), )), ] ) ) ) ); } }