2023-11-21 19:48:58 +01:00
|
|
|
import 'package:cpd_app/ocr_page.dart';
|
|
|
|
import 'package:cpd_app/bottom_bar.dart';
|
2023-11-21 02:29:46 +01:00
|
|
|
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'),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|