Skip to content

Commit

Permalink
OpSo
Browse files Browse the repository at this point in the history
  • Loading branch information
andoriyaprashant committed Sep 11, 2024
1 parent c4815c4 commit 55d6c18
Show file tree
Hide file tree
Showing 38 changed files with 123 additions and 120 deletions.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/OpSo_about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/OpSo_main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/logo.png
Binary file not shown.
Binary file removed assets/splash screen.png
Binary file not shown.
Binary file added assets/splash_main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions lib/ChatBotPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import 'package:adaptive_theme/adaptive_theme.dart';
import 'package:flutter/material.dart';
import 'package:google_generative_ai/google_generative_ai.dart';

const apiKey = 'put-gemini-api-key';
// Replace with your actual Gemini API key
const apiKey = 'api-key';

class ChatBotPage extends StatefulWidget {
const ChatBotPage({Key? key}) : super(key: key);
Expand Down Expand Up @@ -43,8 +44,7 @@ class _ChatBotPageState extends State<ChatBotPage> {
final content = [Content.text(prompt)];
final response = await _model!.generateContent(content);
setState(() {
final botText = response.text!.replaceAll('*', ''); // Remove asterisks
_messages.add({"sender": "bot", "text": botText});
_messages.add({"sender": "bot", "text": response.text!});
});
}
}
Expand Down Expand Up @@ -124,13 +124,15 @@ class _ChatBotPageState extends State<ChatBotPage> {
);
}


@override
void dispose() {
_controller.dispose();
super.dispose();
}
}


void main() {
runApp(const MaterialApp(
home: ChatBotPage(),
Expand Down
2 changes: 1 addition & 1 deletion lib/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AboutScreen extends StatelessWidget {
children: [
// Image
Image.asset(
'assets/logo.png',
'assets/OpSo_about.png',
width: ScreenUtil().setWidth(250),
height: ScreenUtil().setHeight(250),
fit: BoxFit.contain,
Expand Down
212 changes: 106 additions & 106 deletions lib/landing_page.dart
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
import 'package:flutter/material.dart';
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:opso/home_page.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:flutter/material.dart';
// import 'package:animated_text_kit/animated_text_kit.dart';
// import 'package:opso/home_page.dart';
// import 'package:flutter_screenutil/flutter_screenutil.dart';

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

@override
State<LandingPage> createState() => _LandingPageState();
}
// @override
// State<LandingPage> createState() => _LandingPageState();
// }

class _LandingPageState extends State<LandingPage> {
@override
Widget build(BuildContext context) {
ScreenUtilInit(
designSize: Size(360, 690),
);
// double width = MediaQuery.of(context).size.width;
// double height = MediaQuery.of(context).size.height;
return Scaffold(
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20),
child: Container(
child: Column(
children: [
Center(
child: Container(
width: 360.w,
height: (690.h) / 2,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/landing.webp"),
fit: BoxFit.contain),
),
),
),
Center(
child: SizedBox(
child: DefaultTextStyle(
style: TextStyle(
fontSize: 50.sp,
),
child: AnimatedTextKit(
animatedTexts: [
ColorizeAnimatedText(
'Unlock your potential',
textStyle: TextStyle(
fontSize: 20.sp, fontWeight: FontWeight.w700),
colors: [
const Color.fromRGBO(255, 183, 77, 1),
const Color.fromARGB(255, 231, 225, 208)
],
),
],
isRepeatingAnimation: true,
),
),
),
),
const Padding(padding: EdgeInsets.only(top: 20)),
Center(
child: SizedBox(
child: Text(
"Contribute to Open Source",
style: TextStyle(
fontWeight: FontWeight.w400, fontSize: 20.sp),
),
),
),
const Padding(padding: EdgeInsets.only(top: 30)),
Center(
child: SizedBox(
width: 250.w,
height: 60.h,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor:
const Color.fromRGBO(255, 183, 77, 1),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(20)),
)),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => HomePage()));
},
child: Text(
"Get started",
style: TextStyle(
color: Colors.white,
fontSize: (MediaQuery.of(context).size.width <
MediaQuery.of(context).size.height)
? 19.sp
: 19.sh),
),
),
),
),
],
),
),
),
),
);
}
}
// class _LandingPageState extends State<LandingPage> {
// @override
// Widget build(BuildContext context) {
// ScreenUtilInit(
// designSize: Size(360, 690),
// );
// // double width = MediaQuery.of(context).size.width;
// // double height = MediaQuery.of(context).size.height;
// return Scaffold(
// body: SingleChildScrollView(
// child: Padding(
// padding: const EdgeInsets.all(20),
// child: Container(
// child: Column(
// children: [
// Center(
// child: Container(
// width: 360.w,
// height: (690.h) / 2,
// decoration: const BoxDecoration(
// image: DecorationImage(
// image: AssetImage("assets/landing.webp"),
// fit: BoxFit.contain),
// ),
// ),
// ),
// Center(
// child: SizedBox(
// child: DefaultTextStyle(
// style: TextStyle(
// fontSize: 50.sp,
// ),
// child: AnimatedTextKit(
// animatedTexts: [
// ColorizeAnimatedText(
// 'Unlock your potential',
// textStyle: TextStyle(
// fontSize: 20.sp, fontWeight: FontWeight.w700),
// colors: [
// const Color.fromRGBO(255, 183, 77, 1),
// const Color.fromARGB(255, 231, 225, 208)
// ],
// ),
// ],
// isRepeatingAnimation: true,
// ),
// ),
// ),
// ),
// const Padding(padding: EdgeInsets.only(top: 20)),
// Center(
// child: SizedBox(
// child: Text(
// "Contribute to Open Source",
// style: TextStyle(
// fontWeight: FontWeight.w400, fontSize: 20.sp),
// ),
// ),
// ),
// const Padding(padding: EdgeInsets.only(top: 30)),
// Center(
// child: SizedBox(
// width: 250.w,
// height: 60.h,
// child: ElevatedButton(
// style: ElevatedButton.styleFrom(
// backgroundColor:
// const Color.fromRGBO(255, 183, 77, 1),
// shape: const RoundedRectangleBorder(
// borderRadius: BorderRadius.all(Radius.circular(20)),
// )),
// onPressed: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => HomePage()));
// },
// child: Text(
// "Get started",
// style: TextStyle(
// color: Colors.white,
// fontSize: (MediaQuery.of(context).size.width <
// MediaQuery.of(context).size.height)
// ? 19.sp
// : 19.sh),
// ),
// ),
// ),
// ),
// ],
// ),
// ),
// ),
// ),
// );
// }
// }
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class OpSoApp extends StatelessWidget {
const MajorLeagueHackingFellowship(),
"/linux_foundation": (context) => const LinuxFoundation(),
"/GithubCampus": (context) => const GithubCampus(),
"/landing_page": (context) => const LandingPage(),
// "/landing_page": (context) => const LandingPage(),
'/splash_screen': (context) => SplashScreen(),
},
title: 'OpSo',
Expand Down
10 changes: 5 additions & 5 deletions lib/programs screen/hacktoberfest_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ class _HacktoberfestState extends State<Hacktoberfest> {
Padding(
padding: EdgeInsets.symmetric(vertical: pad),
child: Text(
'1. First, go to GitHub.\n\n'
'2. Click on "Issues.\n\n'
'3. Use the filter: is:open is:issue archived:false label:hacktoberfest.\n\n'
'4. Solve issues and make your contributions.\n\n',
'1. First, go to GitHub.\n'
'2. Click on "Issues.\n'
'3. Use the filter: is:open is:issue archived:false label:hacktoberfest.\n'
'4. Solve issues and make your contributions.',
style: TextStyle(
fontSize: contentSize,
height: 1.5, // Adjusts line spacing
height: 2, // Adjusts line spacing
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/splash_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class _SplashScreenState extends State<SplashScreen> {
void initState() {
super.initState();
Timer(Duration(seconds: 3), () {
Navigator.of(context).pushReplacementNamed('/landing_page');
Navigator.of(context).pushReplacementNamed('/progarm_page');
});
}

Expand All @@ -24,7 +24,7 @@ class _SplashScreenState extends State<SplashScreen> {
width: screenSize.width,
height: screenSize.height,
child: Image.asset(
'assets/splash screen.png',
'assets/splash_main.png',
fit: BoxFit.cover,
),
),
Expand Down
5 changes: 3 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dev_dependencies:
flutter_icons:
android: true
ios: true
image_path: "assets/logo.png"
image_path: "assets/OpSo_main.png"
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
Expand Down Expand Up @@ -94,7 +94,8 @@ flutter:
- assets/projects/swoc/
- assets/projects/hyperledger/
- assets/projects/linux_foundation/
- assets/splash screen.png
- assets/splash_main.png
- assets/OpSo_about.png
- assets/github_swag.png
- assets/fossasia.png
- assets/sokde.png
Expand Down

0 comments on commit 55d6c18

Please sign in to comment.