diff --git a/rohith/home.jpg b/rohith/home.jpg new file mode 100644 index 0000000..58b793e Binary files /dev/null and b/rohith/home.jpg differ diff --git a/rohith/newsapp/.gitignore b/rohith/newsapp/.gitignore new file mode 100644 index 0000000..9079a91 --- /dev/null +++ b/rohith/newsapp/.gitignore @@ -0,0 +1,50 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +/build +/ios +/test +/idea +.README.md +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/rohith/newsapp/.metadata b/rohith/newsapp/.metadata new file mode 100644 index 0000000..be0f63d --- /dev/null +++ b/rohith/newsapp/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e + channel: stable + +project_type: app diff --git a/rohith/newsapp/README.md b/rohith/newsapp/README.md new file mode 100644 index 0000000..78a47c9 --- /dev/null +++ b/rohith/newsapp/README.md @@ -0,0 +1,16 @@ +# newsapp + +A new Flutter application. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/rohith/newsapp/analysis_options.yaml b/rohith/newsapp/analysis_options.yaml new file mode 100644 index 0000000..61b6c4d --- /dev/null +++ b/rohith/newsapp/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/rohith/newsapp/android/.gitignore b/rohith/newsapp/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/rohith/newsapp/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/rohith/newsapp/android/app/build.gradle b/rohith/newsapp/android/app/build.gradle new file mode 100644 index 0000000..b45821e --- /dev/null +++ b/rohith/newsapp/android/app/build.gradle @@ -0,0 +1,55 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 30 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.newsapp" + minSdkVersion 16 + targetSdkVersion 30 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} diff --git a/rohith/newsapp/android/app/src/debug/AndroidManifest.xml b/rohith/newsapp/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..bb5361c --- /dev/null +++ b/rohith/newsapp/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/rohith/newsapp/android/app/src/main/AndroidManifest.xml b/rohith/newsapp/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c11c0df --- /dev/null +++ b/rohith/newsapp/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/rohith/newsapp/android/app/src/main/java/com/example/newsapp/MainActivity.java b/rohith/newsapp/android/app/src/main/java/com/example/newsapp/MainActivity.java new file mode 100644 index 0000000..52469ab --- /dev/null +++ b/rohith/newsapp/android/app/src/main/java/com/example/newsapp/MainActivity.java @@ -0,0 +1,6 @@ +package com.example.newsapp; + +import io.flutter.embedding.android.FlutterActivity; + +public class MainActivity extends FlutterActivity { +} diff --git a/rohith/newsapp/android/app/src/main/res/drawable-v21/launch_background.xml b/rohith/newsapp/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/rohith/newsapp/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/rohith/newsapp/android/app/src/main/res/drawable/launch_background.xml b/rohith/newsapp/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/rohith/newsapp/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/rohith/newsapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/rohith/newsapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/rohith/newsapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/rohith/newsapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/rohith/newsapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/rohith/newsapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/rohith/newsapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/rohith/newsapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/rohith/newsapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/rohith/newsapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/rohith/newsapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/rohith/newsapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/rohith/newsapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/rohith/newsapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/rohith/newsapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/rohith/newsapp/android/app/src/main/res/values-night/styles.xml b/rohith/newsapp/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..449a9f9 --- /dev/null +++ b/rohith/newsapp/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/rohith/newsapp/android/app/src/main/res/values/styles.xml b/rohith/newsapp/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..d74aa35 --- /dev/null +++ b/rohith/newsapp/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/rohith/newsapp/android/app/src/profile/AndroidManifest.xml b/rohith/newsapp/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..bb5361c --- /dev/null +++ b/rohith/newsapp/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/rohith/newsapp/android/build.gradle b/rohith/newsapp/android/build.gradle new file mode 100644 index 0000000..622ddc5 --- /dev/null +++ b/rohith/newsapp/android/build.gradle @@ -0,0 +1,27 @@ +buildscript { + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/rohith/newsapp/android/gradle.properties b/rohith/newsapp/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/rohith/newsapp/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/rohith/newsapp/android/gradle/wrapper/gradle-wrapper.properties b/rohith/newsapp/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..bc6a58a --- /dev/null +++ b/rohith/newsapp/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/rohith/newsapp/android/settings.gradle b/rohith/newsapp/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/rohith/newsapp/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/rohith/newsapp/assets/images/mypic.jpg b/rohith/newsapp/assets/images/mypic.jpg new file mode 100644 index 0000000..ec97166 Binary files /dev/null and b/rohith/newsapp/assets/images/mypic.jpg differ diff --git a/rohith/newsapp/lib/main.dart b/rohith/newsapp/lib/main.dart new file mode 100644 index 0000000..de8bbad --- /dev/null +++ b/rohith/newsapp/lib/main.dart @@ -0,0 +1,111 @@ +import 'package:flutter/material.dart'; +import 'package:newsapp/screen/detail/portfolio.dart'; +import 'screen/home/home_page.dart'; +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + debugShowCheckedModeBanner: false, + routes: { + Portfolio.routeName: (ctx)=> Portfolio(), + }, + home: Homepage(), + ); + } +} +/* +class MyHomePage extends StatefulWidget { + const MyHomePage({Key? key, required this.title}) : super(key: key); + + // This widget is the home page of your application. It is stateful, meaning + // that it has a State object (defined below) that contains fields that affect + // how it looks. + + // This class is the configuration for the state. It holds the values (in this + // case the title) provided by the parent (in this case the App widget) and + // used by the build method of the State. Fields in a Widget subclass are + // always marked "final". + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + void _incrementCounter() { + setState(() { + // This call to setState tells the Flutter framework that something has + // changed in this State, which causes it to rerun the build method below + // so that the display can reflect the updated values. If we changed + // _counter without calling setState(), then the build method would not be + // called again, and so nothing would appear to happen. + _counter++; + }); + } + + @override + Widget build(BuildContext context) { + // This method is rerun every time setState is called, for instance as done + // by the _incrementCounter method above. + // + // The Flutter framework has been optimized to make rerunning build methods + // fast, so that you can just rebuild anything that needs updating rather + // than having to individually change instances of widgets. + return Scaffold( + appBar: AppBar( + // Here we take the value from the MyHomePage object that was created by + // the App.build method, and use it to set our appbar title. + title: Text(widget.title), + ), + body: Center( + // Center is a layout widget. It takes a single child and positions it + // in the middle of the parent. + child: Column( + // Column is also a layout widget. It takes a list of children and + // arranges them vertically. By default, it sizes itself to fit its + // children horizontally, and tries to be as tall as its parent. + // + // Invoke "debug painting" (press "p" in the console, choose the + // "Toggle Debug Paint" action from the Flutter Inspector in Android + // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) + // to see the wireframe for each widget. + // + // Column has various properties to control how it sizes itself and + // how it positions its children. Here we use mainAxisAlignment to + // center the children vertically; the main axis here is the vertical + // axis because Columns are vertical (the cross axis would be + // horizontal). + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'You have pushed the button this many times:', + ), + Text( + '$_counter', + style: Theme.of(context).textTheme.headline4, + ), + ], + ), + ), + floatingActionButton: FloatingActionButton( + onPressed: _incrementCounter, + tooltip: 'Increment', + child: const Icon(Icons.add), + ), // This trailing comma makes auto-formatting nicer for build methods. + ); + } +} +*/ \ No newline at end of file diff --git a/rohith/newsapp/lib/screen/config/var/var.dart b/rohith/newsapp/lib/screen/config/var/var.dart new file mode 100644 index 0000000..caa84d4 --- /dev/null +++ b/rohith/newsapp/lib/screen/config/var/var.dart @@ -0,0 +1,11 @@ +const String profileImage = 'https://images.unsplash.com/photo-1552053831-71594a27632d?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1562&q=80'; +final String carImage = 'https://images.unsplash.com/photo-1549632891-a0bea6d0355b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=863&q=80'; +final String dravid = 'https://images.indianexpress.com/2021/05/rahul-dravid.jpg'; +final String oneplus = 'https://i.gadgets360cdn.com/large/mars_nasa_unsplash_1634203725515.jpg'; +final String plane = 'https://images.hindustantimes.com/img/2021/10/14/1600x900/pakistan_airline_suspends_flights_kabul_taliban_1634209269007_1634209269230.jpg'; +final String coal = 'https://images.livemint.com/img/2021/10/14/600x338/2021-03-02T155526Z_1368011162_RC233M9ZHISY_RTRMADP_3_USA-INVESTMENT-COAL_1614927079403_1634209112329.JPG'; +final String stock = 'https://images.moneycontrol.com/static-mcnews/2021/10/sensex_nifty_market-1-770x433.jpg'; +final String taiwan = 'https://www.aljazeera.com/wp-content/uploads/2021/10/2021-10-14T065147Z_1_LWD001AJMIS07_RTRWNEV_E_4016-TAIWAN-FIRE.jpg?fit=768%2C432'; +final String crash = 'https://static.toiimg.com/thumb/msid-87017058,width-1070,height-580,imgsize-1279065,resizemode-75,overlay-toi_sw,pt-32,y_pad-40/photo.jpg'; + + diff --git a/rohith/newsapp/lib/screen/detail/portfolio.dart b/rohith/newsapp/lib/screen/detail/portfolio.dart new file mode 100644 index 0000000..919ab4a --- /dev/null +++ b/rohith/newsapp/lib/screen/detail/portfolio.dart @@ -0,0 +1,257 @@ +import 'package:flutter/material.dart'; +import 'package:newsapp/screen/home/widgets/main_bar.dart'; + +class Portfolio extends StatelessWidget { + + static const routeName = 'Portfolio'; + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + leading: IconButton(onPressed: () { + Navigator.of(context).pop(); + }, icon: Icon(Icons.arrow_back_ios,color: Colors.black,),), + ), + body: Padding( + padding: EdgeInsets.fromLTRB(30.0, 20.0, 30.0, 5.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Center( + child: CircleAvatar( + backgroundImage: AssetImage('assets/images/mypic.jpg'), + radius: 40.0, + ), + ), + SizedBox(height: 20.0,), + const Center( + child: Text( + 'Rohith Prakash', + style: TextStyle( + letterSpacing: 2.0, + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + ), + SizedBox(height: 15.0,), + Center( + child: Text( + 'Full Stack Developer', + style: TextStyle( + color: Colors.grey[600], + letterSpacing: 1.5, + ), + ), + ), + Divider( + height: 60.0, + color: Colors.grey[800], + ), + Container( + width: 420.0, + height:60.0, + padding: EdgeInsets.fromLTRB(20, 10, 10, 10), + decoration: BoxDecoration( + border: Border.all(color: Colors.grey), + borderRadius: const BorderRadius.all( + Radius.circular(5.0) + ), + + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + 'About', + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + Align( + child: Icon( + Icons.arrow_drop_down, + size: 40.0, + color: Colors.grey[850], + ), + ) + ], + ), + ), + + SizedBox(height: 10.0,), + Container( + width: 420.0, + height:60.0, + padding: EdgeInsets.fromLTRB(20, 10, 10, 10), + decoration: BoxDecoration( + border: Border.all(color: Colors.grey), + borderRadius: BorderRadius.all( + Radius.circular(5.0) + ), + + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Skills', + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + Align( + child: Icon( + Icons.arrow_drop_down, + size: 40.0, + color: Colors.grey[850], + ), + ) + ], + ), + ), + + SizedBox(height: 10.0,), + Container( + width: 420.0, + height:60.0, + padding: EdgeInsets.fromLTRB(20, 10, 10, 10), + decoration: BoxDecoration( + border: Border.all(color: Colors.grey), + borderRadius: BorderRadius.all( + Radius.circular(5.0) + ), + + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Connect', + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + Align( + child: Icon( + Icons.arrow_drop_up, + size: 40.0, + color: Colors.grey[850], + ), + ) + ], + ), + ), + + SizedBox(height: 30.0,), + + Padding( + padding: const EdgeInsets.fromLTRB(20.0, 0.0, 0.0, 0.0), + child: Row( + children: [ + Text( + 'Github:', + style: TextStyle( + color: Colors.grey[600], + fontSize: 20.0, + letterSpacing: 1.5, + ), + ), + SizedBox(width: 30.0,), + Text( + 'rohithp7777', + style: TextStyle( + color: Colors.yellowAccent[600], + letterSpacing: 2.0, + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + SizedBox(height: 30.0,), + Padding( + padding: const EdgeInsets.fromLTRB(20.0, 0.0, 0.0, 0.0), + child: Row( + children: [ + Text( + 'LinkedIn:', + style: TextStyle( + color: Colors.grey[600], + fontSize: 20.0, + letterSpacing: 1.5, + ), + ), + SizedBox(width: 30.0,), + Text( + 'rohith-prakash-', + style: TextStyle( + color: Colors.yellowAccent[600], + letterSpacing: 2.0, + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + SizedBox(height: 30.0,), + Padding( + padding: const EdgeInsets.fromLTRB(20.0, 0.0, 0.0, 0.0), + child: Row( + children: [ + Text( + 'Instagram:', + style: TextStyle( + color: Colors.grey[600], + fontSize: 20.0, + letterSpacing: 1.5, + ), + ), + SizedBox(width: 30.0,), + Text( + 'rohithp7._', + style: TextStyle( + color: Colors.yellowAccent[600], + letterSpacing: 2.0, + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + + SizedBox(height: 30.0,), + Padding( + padding: const EdgeInsets.fromLTRB(20.0, 0.0, 0.0, 0.0), + child: Row( + children: [ + Icon( + Icons.email, + size: 40.0, + color: Colors.grey[600], + ), + SizedBox(width: 10.0,), + Text( + 'rohithp8899@gmail.com', + style: TextStyle( + color: Colors.yellowAccent[600], + letterSpacing: 2.0, + fontSize: 18.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + + ], + ), + ), + ); + } +} diff --git a/rohith/newsapp/lib/screen/home/home_page.dart b/rohith/newsapp/lib/screen/home/home_page.dart new file mode 100644 index 0000000..875d4fb --- /dev/null +++ b/rohith/newsapp/lib/screen/home/home_page.dart @@ -0,0 +1,37 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:newsapp/screen/detail/portfolio.dart'; +import 'package:newsapp/screen/home/widgets/category_list.dart'; +import 'package:newsapp/screen/home/widgets/custom_app_bar.dart'; +import 'package:newsapp/screen/home/widgets/recent_news.dart'; +import 'package:newsapp/screen/home/widgets/title_bar.dart'; + +class Homepage extends StatelessWidget { + @override + Widget build(BuildContext context) { + final screenWidth = MediaQuery.of(context).size.width; + return Scaffold( + body: SafeArea(child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + GestureDetector( + onTap: () {Navigator.of(context).pushNamed(Portfolio.routeName);}, + child: CustomAppBar()), + TitleBar(), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Discover',style: TextStyle(fontSize: 28,color: Color.fromRGBO(0, 0, 160, 1),shadows: [ + Shadow( + blurRadius: 6.0, + color: Colors.black54, + offset: Offset(0.5,0.5), + ),]),), + ), + CategoryList(), + Recentnews(), + ], + ),), + ); + } +} + diff --git a/rohith/newsapp/lib/screen/home/widgets/category_list.dart b/rohith/newsapp/lib/screen/home/widgets/category_list.dart new file mode 100644 index 0000000..ed161e8 --- /dev/null +++ b/rohith/newsapp/lib/screen/home/widgets/category_list.dart @@ -0,0 +1,66 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:newsapp/screen/config/var/var.dart'; + +class CategoryList extends StatelessWidget { + const CategoryList({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + color: Colors.black12, + height: 35, + child: Center( + child: ListView( + scrollDirection: Axis.horizontal, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(18, 8, 8, 8), + child: Container( + alignment: Alignment.center, + width: 30, + color: Colors.black, + child: Text('All',style: TextStyle(color: Colors.white),), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Sports'), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Global'), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Health'), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Education'), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Regional'), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Tech'), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Crime'), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text('Money'), + ), + ], + ), + ), + ); + } +} + diff --git a/rohith/newsapp/lib/screen/home/widgets/custom_app_bar.dart b/rohith/newsapp/lib/screen/home/widgets/custom_app_bar.dart new file mode 100644 index 0000000..2f1c0ff --- /dev/null +++ b/rohith/newsapp/lib/screen/home/widgets/custom_app_bar.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; + +class CustomAppBar extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: const [ + CircleAvatar( + radius: 24, + backgroundImage: AssetImage('assets/images/mypic.jpg'), + ), + SizedBox(width: 10), + //Text('13 Oct,2021') + ], + ), + Container( + width: 300, + child: TextField( + style: TextStyle(fontSize: 15), + cursorColor: Colors.black, + decoration: InputDecoration( + suffixIcon: const Icon( + Icons.search, + color: Colors.grey, + ), + border: InputBorder.none, + hintText: "Search News", + filled: true, + fillColor: Colors.grey[200])), + ), + + ], + ), + ); + } +} diff --git a/rohith/newsapp/lib/screen/home/widgets/main_bar.dart b/rohith/newsapp/lib/screen/home/widgets/main_bar.dart new file mode 100644 index 0000000..a1413a4 --- /dev/null +++ b/rohith/newsapp/lib/screen/home/widgets/main_bar.dart @@ -0,0 +1,89 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/painting.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter/widgets.dart'; +import 'package:newsapp/screen/config/var/var.dart'; + +class MainBar extends StatelessWidget { + const MainBar({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + + final screenWidth = MediaQuery.of(context).size.width; + return Container( + height: 200, + child: ListView( + scrollDirection: Axis.horizontal, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Stack( + alignment: Alignment.bottomCenter, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(18), + child: Image.network(dravid), + ), + Container( + width: screenWidth * 0.8, + child: const Text('Rahul Dravid likely to be interim coach for New Zealand series',style: TextStyle(fontSize: 18,color: Colors.white,shadows: [ + Shadow( + blurRadius: 6.0, + color: Colors.black, + offset: Offset(1.0, 1.0), + ), + ],))), + ], + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Stack( + alignment: Alignment.bottomCenter, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(18), + child: Image.network(dravid), + ), + Container( + width: screenWidth * 0.8, + child: const Text('Rahul Dravid likely to be interim coach for New Zealand series',style: TextStyle(fontSize: 18,color: Colors.white,shadows: [ + Shadow( + blurRadius: 6.0, + color: Colors.black, + offset: Offset(1.0, 1.0), + ), + ],))), + ], + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Stack( + alignment: Alignment.bottomCenter, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(18), + child: Image.network(oneplus), + ), + Container( + width: screenWidth * 0.8, + child: const Text('Did Mars Ever Look Like Earth? NASA Scientist Answers - Gadgets 360',style: TextStyle(fontSize: 18,color: Colors.white,shadows: [ + Shadow( + blurRadius: 6.0, + color: Colors.black, + offset: Offset(1.0, 1.0), + ), + ],))), + ], + ), + ), + ] + ), + ); + } +} diff --git a/rohith/newsapp/lib/screen/home/widgets/recent_news.dart b/rohith/newsapp/lib/screen/home/widgets/recent_news.dart new file mode 100644 index 0000000..017aa43 --- /dev/null +++ b/rohith/newsapp/lib/screen/home/widgets/recent_news.dart @@ -0,0 +1,188 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:newsapp/screen/config/var/var.dart'; + +class Recentnews extends StatelessWidget { + const Recentnews({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + + final screenWidth = MediaQuery.of(context).size.width; + return Expanded( + child: ListView.builder( + itemCount: 1, + itemBuilder: (BuildContext context, int index){ + return Column( + children: [ + Container(child: Row( + children: [ + Column( + children: [ + Container( + padding: const EdgeInsets.all(10), + width: screenWidth * 0.28, + height: 80, + child: ClipRRect( + borderRadius: BorderRadius.circular(8), + child: Image.network(oneplus, fit: BoxFit.cover,)),), + ], + ), + Container( + padding: const EdgeInsets.all(8), + width: screenWidth * 0.45, + child: Text('Did Mars Ever Look Like Earth? NASA Scientist Answers',style: TextStyle(fontSize: 13),)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Icon(Icons.calendar_today), + const SizedBox(width: 5), + Text('14 Oct 2021'), + ], + ) + ], + ),), + Container(child: Row( + children: [ + Column( + children: [ + Container( + padding: const EdgeInsets.all(10), + width: screenWidth * 0.28, + height: 80, + child: ClipRRect( + borderRadius: BorderRadius.circular(8), + child: Image.network(plane, fit: BoxFit.cover,)),), + ], + ), + Container( + padding: const EdgeInsets.all(8), + width: screenWidth * 0.45, + child: Text('Pakistan airline suspends flights from Kabul citing Taliban`s heavy-handed interference',style: TextStyle(fontSize: 13),)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Icon(Icons.calendar_today), + const SizedBox(width: 5), + Text('14 Oct 2021'), + ], + ) + ], + ),), + Container(child: Row( + children: [ + Column( + children: [ + Container( + padding: const EdgeInsets.all(10), + width: screenWidth * 0.28, + height: 80, + child: ClipRRect( + borderRadius: BorderRadius.circular(8), + child: Image.network(coal, fit: BoxFit.cover,)),), + ], + ), + Container( + padding: const EdgeInsets.all(8), + width: screenWidth * 0.45, + child: Text('Coal India temporarily halts supply to non-power customers',style: TextStyle(fontSize: 13),)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Icon(Icons.calendar_today), + const SizedBox(width: 5), + Text('13 Oct 2021'), + ], + ) + ], + ),), + Container(child: Row( + children: [ + Column( + children: [ + Container( + padding: const EdgeInsets.all(10), + width: screenWidth * 0.28, + height: 80, + child: ClipRRect( + borderRadius: BorderRadius.circular(8), + child: Image.network(stock, fit: BoxFit.cover,)),), + ], + ), + Container( + padding: const EdgeInsets.all(8), + width: screenWidth * 0.45, + child: Text('Taking Stock: Bull charge pushes Sensex, Nifty to new highs; bank, metal, IT stocks shine',style: TextStyle(fontSize: 13),)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Icon(Icons.calendar_today), + const SizedBox(width: 5), + Text('13 Oct 2021'), + ], + ) + ], + ),), + Container(child: Row( + children: [ + Column( + children: [ + Container( + padding: const EdgeInsets.all(10), + width: screenWidth * 0.28, + height: 80, + child: ClipRRect( + borderRadius: BorderRadius.circular(8), + child: Image.network(taiwan, fit: BoxFit.cover,)),), + ], + ), + Container( + padding: const EdgeInsets.all(8), + width: screenWidth * 0.45, + child: Text('Fire in Taiwan’s Kaohsiung city kills at least 46, wounds over 40',style: TextStyle(fontSize: 13),)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Icon(Icons.calendar_today), + const SizedBox(width: 5), + Text('12 Oct 2021'), + ], + ) + ], + ),), + Container(child: Row( + children: [ + Column( + children: [ + Container( + padding: const EdgeInsets.all(10), + width: screenWidth * 0.28, + height: 80, + child: ClipRRect( + borderRadius: BorderRadius.circular(8), + child: Image.network(crash, fit: BoxFit.cover,)),), + ], + ), + Container( + padding: const EdgeInsets.all(8), + width: screenWidth * 0.45, + child: Text('Tata Punch SUV scores 5-star in Global NCAP crash test',style: TextStyle(fontSize: 13),)), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Icon(Icons.calendar_today), + const SizedBox(width: 5), + Text('13 oct 2021'), + ], + ) + ], + ),), + ], + ); + } + ), + ); + } +} diff --git a/rohith/newsapp/lib/screen/home/widgets/title_bar.dart b/rohith/newsapp/lib/screen/home/widgets/title_bar.dart new file mode 100644 index 0000000..d774347 --- /dev/null +++ b/rohith/newsapp/lib/screen/home/widgets/title_bar.dart @@ -0,0 +1,53 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'main_bar.dart'; + +class TitleBar extends StatelessWidget { + + @override + Widget build(BuildContext context) { + + final screenWidth = MediaQuery.of(context).size.width; + return Padding( + padding: const EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: const [ + + SizedBox(height: 10), + Padding( + padding: EdgeInsets.fromLTRB(8.0,0,0,0), + child: Text('Breaking News',style: TextStyle(fontSize: 36,color: Color.fromRGBO(0, 0, 160, 1),shadows: [ + Shadow( + blurRadius: 6.0, + color: Colors.black45, + offset: Offset(1.0, 1.0), + ),]),), + ), + SizedBox(height: 5), + MainBar(), + //SizedBox(height: 10), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Row( + // children: [ + // CircleAvatar( + // radius: 24, + // backgroundImage: NetworkImage(profileImage), + // ), + // const SizedBox(width: 10), + // Text('Sample Text') + // ], + // ), + // const SizedBox(width: 10), + // Text('13 oct 2021'), + // ], + // ) + ], + ), + ); + } +} + diff --git a/rohith/newsapp/pubspec.lock b/rohith/newsapp/pubspec.lock new file mode 100644 index 0000000..750761f --- /dev/null +++ b/rohith/newsapp/pubspec.lock @@ -0,0 +1,167 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.8.1" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.15.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.10" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" +sdks: + dart: ">=2.12.0 <3.0.0" diff --git a/rohith/newsapp/pubspec.yaml b/rohith/newsapp/pubspec.yaml new file mode 100644 index 0000000..4d6ed31 --- /dev/null +++ b/rohith/newsapp/pubspec.yaml @@ -0,0 +1,90 @@ +name: newsapp +description: A new Flutter application. + +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.12.0 <3.0.0" + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^1.0.0 + +# 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. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + assets: + - assets/images/mypic.jpg + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/rohith/profile.jpg b/rohith/profile.jpg new file mode 100644 index 0000000..75871a6 Binary files /dev/null and b/rohith/profile.jpg differ