78 lines
1.8 KiB
Dart
78 lines
1.8 KiB
Dart
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'),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|