ANDREAS_LATANOWSKY_CPD_1910877/lib/main.dart

78 lines
1.8 KiB
Dart
Raw Normal View History

2023-11-21 02:29:46 +01:00
import 'package:cpd_app/OCRPage.dart';
import 'package:cpd_app/bottomBar.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: OpticText(),
);
}
}
class OpticText extends StatelessWidget {
const OpticText({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.blue,
title: const Text('Optic Text'),
),
body: Center(
child: ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ImageToolsPage()),
);
},
child: const Text('Image Tools'),
),
),
bottomNavigationBar: const BottomBar(),
);
}
}
class ImageToolsPage extends StatelessWidget {
const ImageToolsPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Image Tools'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const OCRPage()),
);
},
child: const Text('OCR'),
),
ElevatedButton(
onPressed: () {},
child: const Text('Image Translation'),
),
],
),
),
);
}
}