mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
// Copyright 2022 The Flutter team. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'dart:io';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:window_size/window_size.dart';
|
|
|
|
void main() {
|
|
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
setWindowTitle('Simplistic Calculator');
|
|
}
|
|
|
|
runApp(
|
|
const ProviderScope(
|
|
child: CalculatorApp(),
|
|
),
|
|
);
|
|
}
|
|
|
|
@immutable
|
|
class CalculatorState {
|
|
final String buffer;
|
|
}
|
|
|
|
class CalculatorApp extends StatelessWidget {
|
|
const CalculatorApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
debugShowCheckedModeBanner: false,
|
|
home: Scaffold(
|
|
body: Container(
|
|
color: Colors.white,
|
|
child: const Center(
|
|
child: Text(
|
|
'Hello GDSC!',
|
|
style: TextStyle(fontSize: 40),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|