Find Max Number Value Between Two Numbers
Complete Code For Max 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 Number1 = 15; int Number2 = 30; int Number3; findMaxBetween2Values() { Number3 = max(Number1, Number2); print(Number3); } @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( appBar: AppBar( backgroundColor: Color(0xFF01579B), title: Text('Max Number Value Between Two Numbers'), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Container( margin: const EdgeInsets.fromLTRB(20, 10, 20, 10), child: RaisedButton( onPressed: () => findMaxBetween2Values(), child: Text(' Find Max Value Between 2 Numbers '), textColor: Colors.white, color:Color(0xFF01579B), padding: EdgeInsets.fromLTRB(12, 12, 12, 12), )), ])))); } }