MOTOSHARE ๐Ÿš—๐Ÿ๏ธ
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
๐Ÿš€ Everyone wins.

Start Your Journey with Motoshare

How to create your Flutter project in VS Code

Launch Visual Studio Code and open the command palette (withย F1ย orย Ctrl+Shift+Pย orย Shift+Cmd+P). Start typing “flutter new”. Select theย Flutter: New Projectย command.

Next, selectย Applicationย and then a folder in which to create your project. This could be your home directory, or something likeย C:\src\. Finally, name your project. Something likeย name_app

Flutter now creates your project folder and VS Code opens it. You’ll now overwrite the contents of 3 files with a basic scaffold of the app. Copy & Paste the initial app

In the left pane of VS Code, make sure thatย Explorerย is selected, and open theย pubspec.yamlย file.

Replace the contents of this file with the following:

In pubspec.yaml

name: namer_app
description: A new Flutter project.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 0.0.1+1

environment:
  sdk: '>=2.19.4 <4.0.0'

dependencies:
  flutter:
    sdk: flutter

  english_words: ^4.0.0
  provider: ^6.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter

  flutter_lints: ^2.0.0

flutter:
  uses-material-design: true

Theย pubspec.yamlย file specifies basic information about your app, such as its current version, its dependencies, and the assets with which it will ship.

Next, open another configuration file in the project,ย analysis_options.yaml.

Replace its contents with the following:

analysis_options.yaml

include: package:flutter_lints/flutter.yaml

linter:
  rules:
    prefer_const_constructors: false
    prefer_final_fields: false
    use_key_in_widget_constructors: false
    prefer_const_literals_to_create_immutables: false
    prefer_const_constructors_in_immutables: false
    avoid_print: false

This file determines how strict Flutter should be when analyzing your code. Since this is your first foray into Flutter, you’re telling the analyzer to take it easy. You can always tune this later. In fact, as you get closer to publishing an actual production app, you will almost certainly want to make the analyzer stricter than this. Finally, open theย main.dartย file under theย lib/ย directory.

Replace the contents of this file with the following:

lib/main.dart

import 'package:english_words/english_words.dart';import 'package:flutter/material.dart';import 'package:provider/provider.dart';void main() {  runApp(MyApp());}class MyApp extends StatelessWidget {  const MyApp({super.key});  @override  Widget build(BuildContext context) {    return ChangeNotifierProvider(      create: (context) => MyAppState(),      child: MaterialApp(        title: 'Namer App',        theme: ThemeData(          useMaterial3: true,          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange),        ),        home: MyHomePage(),      ),    );  }}class MyAppState extends ChangeNotifier {  var current = WordPair.random();}class MyHomePage extends StatelessWidget {  @override  Widget build(BuildContext context) {    var appState = context.watch<MyAppState>();    return Scaffold(      body: Column(        children: [          Text('A random idea:'),          Text(appState.current.asLowerCase),        ],      ),    );  }}

Related Posts

The Smart Patientโ€™s Guide to Comparing Medical Treatment Costs Globally

Making decisions about your health is rarely easy. When you or a loved one faces a medical challenge, the sheer volume of information can feel overwhelming. Suddenly,…

Read More

Compare Treatment Costs and Book Doctors Online With MyHospitalNow

Choosing the right healthcare path is often a source of immense stress. Whether you are dealing with a sudden illness, managing a chronic condition, or seeking a…

Read More

The Ultimate Guide to Version Control and SCM for DevOps Beginners

Introduction In the modern world of software development, no one builds applications in isolation. Whether you are working on a small internal tool or a massive e-commerce…

Read More

Definitive Guide to Infrastructure as Code and Cloud Automation

Introduction In the early days of corporate computing, provisioning hardware was a slow, bureaucratic process. If a development team needed a new environment to test an application,…

Read More

The Executive Guide to Navigating Enterprise Cloud Transformation and DevOps

Introduction Modern business landscapes require organizations to adapt at a pace never seen before. Customer expectations shift in days rather than years, forcing traditional industries to reconsider…

Read More

DevOps Supports Digital Transformation: A Practical Guide for Enterprises

Introduction In the current business landscape, the pressure to modernize is no longer a luxury; it is a matter of survival. Organizations across every industry, from retail…

Read More
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x