85 lines
2.0 KiB
Dart
85 lines
2.0 KiB
Dart
import 'package:cpd_app/image_translator.dart';
|
|
import 'package:cpd_app/ocr_page.dart';
|
|
import 'package:cpd_app/bottom_bar.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: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const ImageTranslation()),
|
|
);
|
|
},
|
|
child: const Text('Image Translation'),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|