Flutter - Dart

Математикалық есеп

main.dart

				
					import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    String expression = '2 + 2 * 5';
    int result = 2 + 2 * 5;

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Математикалық есеп'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Text(
                'Есеп: $expression',
                style: TextStyle(fontSize: 24),
              ),
              SizedBox(height: 20),
              Text(
                'Шешімі: $result',
                style: TextStyle(fontSize: 24),
              ),
            ],
          ),
        ),
      ),
    );
  }
}