Skip to content

Commit

Permalink
iiitl#8 change the name to translator
Browse files Browse the repository at this point in the history
  • Loading branch information
RISHABHKUSHWAHA7 committed Mar 15, 2024
1 parent 890a7f9 commit 2d25c13
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 12 deletions.
40 changes: 30 additions & 10 deletions translate_app/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
# translate_app
# Project Name

A new Flutter project.
Short project description or tagline

## Getting Started
## Table of Contents

This project is a starting point for a Flutter application.
- [Description](#description)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [External Resources](#external-resources)
- [Additional Notes](#additional-notes)

A few resources to get you started if this is your first Flutter project:
## Description

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
A brief and clear overview of the project, including its purpose, features, and any important information.

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
## Installation

Step-by-step instructions on how to install the project, including any dependencies or setup steps. You may include commands or links to detailed installation guides if needed.

## Usage

Provide examples or code snippets demonstrating how to use the project. This section should cover basic usage scenarios and may include screenshots if applicable.

## Contributing

Guidelines for contributing to the project, including how to report issues, submit feature requests, and guidelines for code contributions. Encourage others to get involved and provide clear instructions on how they can contribute.

## External Resources

Links to any external documentation, related projects, or helpful resources. Ensure that all links are working and up-to-date.

## Additional Notes

Any additional information or notes that are relevant to the project, such as coding style conventions, branding guidelines, or acknowledgments.
2 changes: 1 addition & 1 deletion translate_app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="translate_app"
android:label="Translate"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon">
<activity
Expand Down
84 changes: 83 additions & 1 deletion translate_app/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'package:flutter/material.dart';
import 'package:translate_app/models/language.dart';
import 'package:translate_app/services/service.dart';
import 'package:flutter/services.dart';

// import 'package:translate_app/screens/splash_screen.dart';
// import 'package:get/get.dart';

void main() {
Expand Down Expand Up @@ -30,7 +33,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: LanguageTranslator(),
home: SplashScreen(),
);
}
}
Expand Down Expand Up @@ -172,3 +175,82 @@ class _LanguageTranslatorState extends State<LanguageTranslator> {
);
}
}









class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});

@override
State<SplashScreen> createState() => _SplashScreenState();
}

class _SplashScreenState extends State<SplashScreen> with SingleTickerProviderStateMixin {

@override
void initState() {
super.initState();
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersive);
Future.delayed(Duration(seconds: 2), () {
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (_) => LanguageTranslator()), // Navigate to LanguageTranslator screen
);
});
}


@override
void dispose() {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,overlays: SystemUiOverlay.values);
super.dispose();
}





@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
width: double.infinity,
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [
Color.fromARGB(255, 252, 253, 254),
Color.fromARGB(255, 0, 0, 0),
// Colors.red,
],
begin: Alignment.topRight,
end: Alignment.bottomLeft,
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const[
Icon(
Icons.book,
size: 80,
color: Colors.white,
),
SizedBox(height: 40),
Text(
'Welcome to Translate app',
style: TextStyle(
fontStyle: FontStyle.italic,
color: Colors.white,
fontSize: 32,
),
),
],
),
),
);
}
}
Empty file.
16 changes: 16 additions & 0 deletions translate_app/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
animated_splash_screen:
dependency: "direct dev"
description:
name: animated_splash_screen
sha256: f45634db6ec4e8cf034c53e03f3bd83898a16fe3c9286bf5510b6831dfcf2124
url: "https://pub.dev"
source: hosted
version: "1.3.0"
archive:
dependency: transitive
description:
Expand Down Expand Up @@ -187,6 +195,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.1"
page_transition:
dependency: transitive
description:
name: page_transition
sha256: dee976b1f23de9bbef5cd512fe567e9f6278caee11f5eaca9a2115c19dc49ef6
url: "https://pub.dev"
source: hosted
version: "2.1.0"
path:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions translate_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.13.1"
animated_splash_screen:

flutter_launcher_icons:
android: "launcher_icon"
Expand Down

0 comments on commit 2d25c13

Please sign in to comment.