fabiochiu/medium-articles huggingface dataset:
Trading with Low Risk is a Good Game!!!
By: Kazi Tanzib
Tags: Forex Profit, Forex, Forex Risks, Risk Management, Forex Trading

Many people are attracted to forex trading because they are finding profits through leverage. But they ignore the risk of loss.

Risk is a must in forex trading. So, a proper roadmap and making a useable strategy will beneficial for gaining consistent profits.

However, with low risk, the forex trading strategy will hopefully show more success in the long term.

Risk is Unavoidable

Risk is small work, but you can’t ignore that there is no business without any specific risk. But with proper research and decisions, there are ways to accomplish success.

Also, trading is some kinda business. Traders invest money and gain profits through them. Traders making money through market research and making solid decisions. There will be some risk in trading, but it can be diminished with proper knowledge of the market and your trading strategy.However, forex trading platforms plays a vital role for gaining steady profit.

Sometimes it good to mute

Forex trading is available 24/5. While market is so volatile, it good to quiet. Some novice traders are loosing trade beacase of that reason.

If you magnify the risk, then there you find a point that not always trade. But if they want to manage their risk, they must not be afraid to sit out. Though they might miss some winning trades, they will likely skip the losing trades too.

Also, trader can modify their position size and they can choose which time frame is beneficial for his trading. A kind of strategy can be a reason for profitable trading.

Trading Psychology

Psychology might be the most underrated tool that forex traders have. Let’s say a market will either go up or down over the longer-term. With that, in theory, traders will have about 50% chances of success on all trade.

So, what will they do with the odds? Traders decided to short, for example, the USD/CHF pair.

As traders sell the press button, the market turns around and goes higher immediately. Then, they have 50 pips stop loss that is in danger of being hit quickly.

And sadly, too many traders will move their stop loss even higher with hopes of the market turning back in their favor.

The bottom line

Overall, the main thing in forex trading is to keep quit and go with the trend. If one have enough amount of capital and goes with the trend, surely it will make consistent profit as usual.
Reducing Risk by Monitoring
By: Trust Exchange
Tags: Network, Third Party, Risk Management, B2B

Understanding the risk profile of a company is vital, should be monitored continuously over time and consider all key components of a business’ value including customers, vendors and partners.

Broken Risk Management

Most businesses, especially small and medium companies, equate risk to the ability of a customer to pay, and, if a business performs a credit check at all, they usually perform it once, just before a engaging a company. This strategy is ok if the entire relationship only involves a single transaction but most B2B transactions are recurring in nature. Therefore, if you have a long term relationship with a customer, and are not monitoring their viability over the life of that relationship, you are leaving yourself vulnerable.

Business relationships should be viewed as a sort of life-cycle and not an event. The credit risk or viability of customers should be continuously monitored through the entire term of the relationship. The viability of any given company, varies over time and can be impacted by many things including their performance, business cycles and the political environment. Understanding the ebb and flow of a company’s business is key to understanding their viability. As the number of customers grows beyond a handful, this can be a difficult task. One of the key benefits of Trust Exchange’s dashboard is that you can monitor these relationships over time giving a much clearer perspective of risk.

More Than Customers

Business risk presents itself in multiple ways beyond late paying customers and simply performing a credit check on a prospect before they become a customer is not an adequate way to mange risk. For instance, if a key supplier fails, they could impact the ability to deliver the end product. Equally devastating would be the failure of a key product partner or channel partner responsible for a large percentage of bookings or revenue. To measure risk, a deeper view into the workings of a company is necessary. Trust Exchange enables users to track the risk in their entire environment, view it as a portfolio and examine customers, vendors and partners independently.

At Trust Exchange, we feel that risk management is fundamentally broken but can be dramatically improved through monitoring all key relationships: Customers, Vendors and Partners.

Help us build the network…JOIN HERE.
So, You Want To Be A CISM
Tags: Information Security, Cybersecurity, Certification, Risk Management, Cism

From ISACA.org

I was talking to a friend of mine recently about the cybersecurity landscape and how it seems that the industry values certifications more than the degree.

His response was not what I had hoped, but it is reality.

To be noticed in this space you need to get your certification.

There are several certifications. Some are not cheap, nor easy to pass. One advise is to take your time to understand the purpose of each one and select the right one for you.

My friend’s advise was to go for the Certified Information Security Management CISM certification because it was geared towards the management side of infosec. The other one, Certified Information Systems Security Profession (CISSP) is geared towards those who have the technical background. Ultimately, the CISM was the right choice for me.

The CISM is an ISACA certification that “validates your knowledge and expertise in managing enterprise information security teams”. The test is four hours long with 150 questions. The score range is 200 to 800, with 450 being the lowest passing grade. The questions are divided into four domains.

Domain 1: Information Security Governance, which is 24% of the score. In this section you learn about the core of infosec and how it fits into the business. From board members to employees, roles and responsibilities framework, metrics and more.

Domain 2: Information Risk Management makes up the majority of the test at 30%. In this section you learn about the various stages of risk management, what you should do before, during and a risk analysis.

Domain 3: Information Security Program Development and Management is 27% of the test. You will learn security program management and development like risk treatments, audits, and controls.

Domain 4: Information Security Incident Management is the last section which counts for only 19% of the test. This section focuses on business continuity and incident responses.

Once you take the test and pass, you will need to be approved for the certification. You can find additional information about the requirements here.

The CISM test costs $575 for ISACA members and $760 for non members. Windows to take the test opens on a quarterly basis.

If you are thinking about taking the test or studying for it leave a response below.

Good luck!

When you combine cybersecurity, compliance, education and creativity you get Olayinka. With over 18 years of experience in regulatory compliance, master’s degree in cybersecurity and recently passed the CISM exam, Olayinka is dedicated to helping financial firms strengthen their security program. Follow me for more interesting tips on cybersecurity.
Flutter Widgets of the Weeks
By: Ionic Firebase App
Tags: Open Source, Flutter, Dart, Coding, Programming

Thanks for all begin touch with us at GetWidget and keep providing love and support to our flutter UI open-source.

Today we are sharing the top 5 widgets of the weeks based on the Analytics report.

Widgets of the week

Here are the top 5 widgets that we get max requests from all flutter developers.

Flutter Button Widget: It is one of the most visited and most requested widgets of the open-source packages. The most obvious is that every app required a call to action and the button is most commonly used for the call to action events. So if you have a requirement then you can build with a pre-build flutter button component.

Flutter button widget

Check out how to start building flutter button widget custom properties at

2. Flutter Card Widget: A material design card: a panel with slightly rounded corners and an elevation shadow.

Flutter card widget

So if you are want to get started with how to build a Flutter card in your app then check out our docs with their custom properties here

3. Flutter Badge Widget: A flutter widget component for creating badges. Badges can be used as an additional marker for any widget, e.g. show a number of items in a shopping.

flutter badge widget

So, if your app does require a Flutter badge widget then you can try our package. Check out implementation and custom properties here:

4. Flutter Tile Widget: A list tile contains one to three lines of text optionally flanked by icons or other widgets, such as checkboxes. The icons (or other widgets) for the tile are defined with the leading and trailing parameters. The first line of text is not optional and is specified with title. The value of subtitle, which is optional, will occupy the space allocated for an additional line of text, or two lines if isThreeLine is true. If dense is true then the overall height of this tile and the size of the DefaultTextStyles that wrap the title and subtitle widget are reduced.

Flutter Tile Widget

It is the responsibility of the caller to ensure that title does not wrap, and to ensure that subtitle doesn’t wrap (if isThreeLine is false) or wraps to two lines (if it is true). Read more about Flutter List Tile Widget here

5. Flutter Carousel Widget: GF Carousel is a Flutter Carousel widget that used for the List of Images given to the items in the GFCarousel, it allows us to slide each image container. The below code gives the default image slider component

Read more about the Carousel Widget implementation and its custom properties details here.

If you are new here then check out our details here:

Or get in touch with us at:

Facebook: https://www.facebook.com/getwidget/

Twitter: https://twitter.com/getwidgetdev

LinkedIn: https://www.linkedin.com/showcase/getwidget

GitHub: https://github.com/ionicfirebaseapp/getwidget

Pub.dev: https://pub.dev/packages/getwidget

#flutter #widgetoftheweek
RadioButton With ChangeNotifier Provider — Flutter
By: Saravanan M
Tags: Flutter, Dart, Flutter App Development

In this article, I will tell you how we can use radio buttons with ChangeNotifier without mixing the UI and business logic.

It’s very crucial to move our business logic out of our UI so that we can easily maintain and unit test our code, but it's pretty hard in flutter because both the UI and business logic are written in one programing language — Dart. So we are going to write all our business logic in the ChangeNotifier provider leaving our UI very lean and clean. (Not gonna use setState())

We are going to create an app that looks like this,

What our App will do

Users can tap any of the radio buttons on the Home screen and the corresponding style will be fetched from our fake-API. Our fake-API will respond with JSON containing the text style format and some other meta-data. We will use the text style from the JSON and render the ‘Hello World’ text on the home screen with it.

The architecture diagram is,

Presentation Layer — This is our UI layer, we will be writing all our UI code here.

Business Layer — All our logic goes into this layer. ChangeNotifier goes here and will make use of the service class to fetch the data.

Data Layer — The service class is used to fetch the data from our Fake REST-API and convert it into a Data Transfer Object(DTO)

Code Structure

To keep it very simple I have only 3 layers, I could’ve separated all the service classes into a service package, since our app is so small and has only one service class I preferred this structure.

This is not a very sophisticated structure, I will write an article about how we can structure our code more granularly.

Let’s start from the Data layer,

Data Layer

First, let’s create our model(DTO) class,

Model Class

I haven’t done many validation checks here, but if you want you can

This is a Data Transfer Object. What is a DTO?

A Data Transfer Object is an object that is used to encapsulate data, and send it from one subsystem of an application to another and has no other logic written in it except serialization logic and deserialization(fromJson() here) logic.(see here)

This class contains some text-style fields like color,fontWeight,fontSize, and some other meta-data like home many people liked the text style.

Service class

In the service layer, we usually make HTTP requests to fetch data(any CRUD operation) from a server or access data in the local database and parse the response from raw data(JSON, XML, etc) to a Data Transfer Object.

To make this article very short, I have made 5 fake JSON responses and stored them in a list.

But this is how we can request data from our REST-API,

Future<TextStyleResponse> fetchTextStyle(int index) async{

Uri uri = Uri.parse("www.myapi.com/styles/$index");

var response = await http.get(uri);

Map<String,dynamic> responseMap = json.decode(response.body);

return TextStyleResponse.fromJson(responseMap);

}

Since we are done with our data layer, let’s move on to our business logic layer
Change Flutter app theme according to the system theme mode
By: Thiago Evoá
Tags: Flutter, Dart

As usual I won’t make a fancy app, and will only focus on the implementation of the feature. What we want to archive in this article is, when the user changes the OS theme the app will listen and then change the theme according it, and the result will be like the image bellow.

App

The first thing you need to do is change the first widget in the tree to StatefulWidget because some part of the code will be in the init function. And after that you need to observe the event when the user changes the OS theme, and for that you will extend the WidgetsBidingObserver on you widget.

StatefulWidget

Now let’s use the ValueNotifier as the tool to control the state management and trigger the event to the widget tree and change the brightness.

ValueNotifier

Next step is register the widget in the WidgetsBinding observer to listen to the change theme event and initialise the app brightness according the OS brightness on the initState function. Then you need to implement the didChangePlatformBrightness function because every time this change theme event happen this function will be trigged and you need to update the value according the OS.

WidgetsBinding

Last but not least, you need to put your MaterialApp widget inside a ValueListenableBuilder in order to listen the change on the state management and reflect the update on the widget tree.
Create a Sticky Footer With a Scrollable Body View in Flutter
Tags: Uiux, Widgets, UI, Flutter, Dart

Create a Sticky Footer With a Scrollable Body View in Flutter ObadaJasm Follow Jan 27 · 2 min read

Create a Widget that contains a Header And most importantly a Footer which obviously should remain in the end of your screen

So ?

you’ll say Simply I’ll use the EXPANDED widget over my body so it will take all space and left some in the top and the bottom to header and footer So what are you offering!.

BUT what if the Body is Scrollable (ex: listview) you know for sure that you can not use a EXPANDED widget over a Scrollable Widget.

If your list always have items that will push your footer down then you have no problem,

but what if not ?

not enough items in the list to push the footer down

and don’t forget that your list is scrollable

in order to Create a Sticky footer in flutter we gonna use Slivers,

A sliver is a portion of a scrollable area that you can define to behave in a special way. You can use slivers to achieve custom scrolling effects, such as elastic scrolling. https://flutter.dev/docs/development/ui/advanced/slivers

Well we’re gonna start by Using a CustomScroll Which work with our slivers, First child will be the SliverList which will hold the Header and The Body.

Note that you MUST use shrinkWrap:true in your list, So you can force your list to take only space as it’s need.

the second child to our CustomScroll is the SliverFillRemaining as the name implies we’re gonna place the Footer here and make it Algin to the bottom of the the remaining space .

note that the default behavior for the SliverFillRemaining is to have a scroallable body for it’s child dont’t forget to change that.

Result:

You can always replace this header with more Powerful widget, SliverAppBar with more fancy options like float,snap,pinned..

see:

https://api.flutter.dev/flutter/material/SliverAppBar-class.html

Full example:
Getting started with Flutter
Tags: App Development, Getting Started, Flutter, Tutorial, Dart

Flutter is an Open-Source UI-Development-Kit, developed by Google, which gives developers the opportunity to develop hybrid apps in a very short time, while still providing high performance.

Let’s get started and see how easy it is to start the first app.

Install

First of all you need of course Flutter. Follow the installment steps on the website for your system: https://flutter.dev/docs/get-started/install

Your first app

After everything is installed, open the Flutter console (or your regular console/terminal if you set the PATH variable), navigate to the folder where you store your projects and type the following:

$ flutter create MyFirstApp

And that’s it already, you created your first app. To run your app, connect a phone or start an emulator and type:

$ cd MyFirstApp

$ flutter run MyFirstApp

The app will launch and you will see this screen:

Not the typical “Hello World”, but your first app, ceated with Flutter. Congratulations! This app will run on Android and iOS devices. Google isn’t lying, when they promise the opportunity to develop hybrid apps in record time.

Advanced Settings

You already created your app and ran it succesfully. However, if you’d like to learn some advanced settings for creating an app via command line, you can continue reading, otherwise you can skip this part.

When creating an app, you might set some additional flags, e.g. for the prefered language used specific on Android or iOS devices. You have the choice between Java and Kotlin for Android and Objective-C and Swift for iOS. The default for every app is Swift for iOS and Kotlin for Android. So, running:

$ flutter create MyFirstApp

is the same as:

$ flutter create -a kotlin -i swift MyFirstApp

If you want e.g.: Java and Objective-C instead, run the command:
Worsley comes up just short as Fisher makes his mark— PDC Qualifying School Final Stage Day One
By: Darts Cymru
Tags: Qschool, Cymru, Wales, Pdc, Dart

Worsley comes up just short as Fisher makes his mark— PDC Qualifying School Final Stage Day One Darts Cymru Feb 14·3 min read

The Final Stage of the 2021 PDC UK Qualifying School got underway today in Milton Keynes, with 17 Welshmen battling it out for a two-year PDC Tour Card.

Taking place from February 14–17, at the Marshall Arena the Final Stage will see the overall winner on each of the four days secure a Tour Card, while an Order of Merit will be used to award a further 13 Tour Cards in the UK.

The first event of UK Q School saw 127 players in action, after the withdrawal of Nathan Rafferty following the sudden death of his father. It was widely reported that Wayne Warren supposedly missed a call from the PDC to take his place in the Final Stage as one of the first reserves. Welshman Robert Owen therefore received a BYE in the 1st Round.

The standout performance on day 1 came from Chepstow’s Jon Worsley who reached the Semi Final as he overcame fellow compatriots Jim Williams & Sean Fisher on route. He was beaten at the last 4 stage by England’s Jack Main 6–4, who then went onto lose the Tour Card shootout against Kirk Shepherd.

Worsley is an old campaigner when it comes to Q School having been successful on two occasions in 2016 & 2019 in gaining darts’ golden ticket. Today’s deep run puts him in 3rd position on the Order of Merit with 4 points already registered to his name.

Jon Worsley will be looking to regain the Tour Card he lost in 2020

A special mention must also go to Porthcawl’s Fisher who conquered Lewy Williams, Fallon Sherrock and Rhys Davies on his way to the last 16 securing himself an all important 2 points and sits in 10th place.

Meanwhile, there were disappointing first round defeats for former Tour Card holders Jamie Lewis & Barrie Bates as well as 1995 BDO World Champion Richie Burnett.

Here are the results from a Welsh perspective on Day 1.

Last 128

Robert Owen BYE

Rhys Griffin (95.2) 6–2 Gordon Mathers

Jon Worsley (87.2) 6–4 Jim Williams (88.8)

Liam Meek (82.7) 6–5 Thomas Lovely

Sean Fisher (87.6) 6–2 Lewis Williams (86.1)

Eddie Lovely 6–3 Jamie Lewis (79.2)

Robert Rickwood 6–5 Kevin Thomas (80.0)

Chas Barstow 6–3 Sam Cankett (86.1)

Dale Hughes (81.4) 6–4 Justin Hood

Gavin Carlin 6–2 Mike Warburton (82.4)

Rhys Davies (94.9) 6–0 Barrie Bates (72.3)

Alan Norris 6–3 Richie Burnett (84.9)

Derek Coulson (85.4) 6–3 Daniel Lee

Martin Thomas (87.6) 6–2 Andy Jenkins
JSON To Flutter Objects
Tags: Json To Dart, Json Api, Flutter, Dart, Object Oriented

JSON To Flutter Objects

You Can Make Your JSON file in to Flutter Object Very Easily By Using Below Method.

Lets Look At The First Example Of JSON That We Want To Create

{

“data”: {

“_id”: “5bd2a59f4c59de1ac517d7bf”,

“email”: “fjhsd@gmail.com”,

“phoneNumber”: “2417874147”,

“isAddressApproved”: 0,

“unitNumber”: “144”,

“streetAddress”: “sdfsddsf”,

“area”: “asd”,

“zipCode”: “112233”,

“totalOrder”: 0,

“todayOrder”: 0,

“isPauseDelivery”: false,

“vacationStartDt”: null,

“vacationEndDt”: null,

“defaultLiter”: 1

},

“message”: “New User Created”,

“error”: false

}

As you Can See It Is A Little Bit Hard SO Lets Look A the Dart Objects That Match this Json Code

class Autogenerated {

Data data;

String message;

bool error;

Autogenerated({this.data, this.message, this.error});

Autogenerated.fromJson(Map<String, dynamic> json) {

data = json[‘data’] != null ? new Data.fromJson(json[‘data’]) : null;

message = json[‘message’];

error = json[‘error’];

}

Map<String, dynamic> toJson() {

final Map<String, dynamic> data = new Map<String, dynamic>();

if (this.data != null) {

data[‘data’] = this.data.toJson();

}

data[‘message’] = this.message;

data[‘error’] = this.error;

return data;

}

}

class Data {

String sId;

String email;

String phoneNumber;

int isAddressApproved;

String unitNumber;

String streetAddress;

String area;

String zipCode;

int totalOrder;

int todayOrder;

bool isPauseDelivery;

Null vacationStartDt;

Null vacationEndDt;

int defaultLiter;

Data(

{this.sId,

this.email,

this.phoneNumber,

this.isAddressApproved,

this.unitNumber,

this.streetAddress,

this.area,

this.zipCode,

this.totalOrder,

this.todayOrder,

this.isPauseDelivery,

this.vacationStartDt,

this.vacationEndDt,

this.defaultLiter});

Data.fromJson(Map<String, dynamic> json) {

sId = json[‘_id’];

email = json[‘email’];

phoneNumber = json[‘phoneNumber’];

isAddressApproved = json[‘isAddressApproved’];

unitNumber = json[‘unitNumber’];

streetAddress = json[‘streetAddress’];

area = json[‘area’];

zipCode = json[‘zipCode’];

totalOrder = json[‘totalOrder’];

todayOrder = json[‘todayOrder’];

isPauseDelivery = json[‘isPauseDelivery’];

vacationStartDt = json[‘vacationStartDt’];

vacationEndDt = json[‘vacationEndDt’];

defaultLiter = json[‘defaultLiter’];

}

Map<String, dynamic> toJson() {

final Map<String, dynamic> data = new Map<String, dynamic>();

data[‘_id’] = this.sId;

data[‘email’] = this.email;

data[‘phoneNumber’] = this.phoneNumber;

data[‘isAddressApproved’] = this.isAddressApproved;

data[‘unitNumber’] = this.unitNumber;

data[‘streetAddress’] = this.streetAddress;

data[‘area’] = this.area;

data[‘zipCode’] = this.zipCode;

data[‘totalOrder’] = this.totalOrder;

data[‘todayOrder’] = this.todayOrder;

data[‘isPauseDelivery’] = this.isPauseDelivery;

data[‘vacationStartDt’] = this.vacationStartDt;

data[‘vacationEndDt’] = this.vacationEndDt;

data[‘defaultLiter’] = this.defaultLiter;

return data;

}

}

Hope You Get How To Make Dart Objects Out of Flutter Code
How to create Carousel in Flutter
By: Atul Sharma
Tags: Carousel, Flutter, Dart, Carousel In Flutter

In one of my project, it is required to implement a carousel with Image and few text of different styles. I had started searching for some code and every time ends with a carousel code with single image, than i had developed a carousel with custom views for my project. I will explain step by step how i had developed it. You can easily customise it for any other type of view.

Add Dependency

In your flutter project add dependency in pubspec.yaml file

dependencies:

flutter:

sdk: flutter

carousel_widget:

Add Images to Assets

assets:

- assets/

- images/place1.JPG

- images/place2.JPG

- images/place3.JPG

Import Packages

import carousel_widget into dart file

import 'package:flutter/material.dart';

import 'package:carousel_widget/carousel_widget.dart';

Prepare Screens for carousel

Let us now create screen for carousel, you can create any custom design as per your requirement. Here we will create screen with one image on top, than a title and blow that description.

for that create list and populate data to them

List<String> titles = List();

List<String> description = List();

List<String> imagenames = List();



void initializeData() {

titles.add("Title of First Screen");

description.add("Description of First Screen");

imagenames.add("images/place1.jpg");



titles.add("Title of Second Screen");

description.add(

"Description of Second Screen");

imagenames.add("images/place2.jpg");



titles.add("Title of Third Screen");

description.add(

"Description of Third Screen");

imagenames.add("images/place3.jpg");

}

for creating screen i had created a function getScreen(index) where image, title and description are taken from List depending upon index. If in your case you want entirely different screens in carousel than write separate function to design separate screen with different components and layout.

Widget getScreen(index) {

return new ListView(

children: <Widget>[

new Container(

height: 250.0,

margin: const EdgeInsets.fromLTRB(20.0, 90.0, 20.0, 0.0),

child: Image.asset(

imagenames.elementAt(index),

),

),

new Container(

height: 45.0,

margin: const EdgeInsets.fromLTRB(20.0, 8.0, 20.0, 0.0),

child: Text(

titles.elementAt(index),

textAlign: TextAlign.center,

overflow: TextOverflow.ellipsis,

style: TextStyle(fontSize: 20),

),

),

new Container(

height: 100.0,

margin: const EdgeInsets.fromLTRB(50.0, 12.0, 50.0, 0.0),

child: Text(

description.elementAt(index),

textAlign: TextAlign.center,

overflow: TextOverflow.ellipsis,

maxLines: 5,

style: TextStyle(fontSize: 15),

),

),

],

);

}

Now according to index passed to getScreen we get a widget corresponding to a screen in carousel.

Creating carousel

Now we are having the screens designed we can create carousel.

@override

Widget build(BuildContext context) {



initializeData();



return Scaffold(

backgroundColor: Colors.white,

body:

Carousel(

listViews: [

Fragment(

child: getScreen(0),

),

Fragment(

child: getScreen(1),

),

Fragment(

child: getScreen(2),

)

],

)

);

}

Complete Code
Network (Http) call in flutter
By: Vivek Yadav
Tags: API, Http, Flutter, Dart, Request

Network (Http) call in flutter

We need to do http call when we need some data from server. Let’s see how it is done in flutter. It’s quite easy..

First we’ll add HTTP dependency plugin to flutter pubspec.yaml

dependencies:

flutter:

sdk: flutter

http: //http plugin

Let’s create a new stateful class to demonstrate http in flutter

import 'package:flutter/material.dart';



class HttpExample extends StatefulWidget {

@override

_HttpExampleState createState() => _HttpExampleState();

}



class _HttpExampleState extends State<HttpExample> {

@override

Widget build(BuildContext context) {

return Container();

}

}

Import http plugin

import 'package:http/http.dart' as http;

We will call ‘http://numbersapi.com/number’ using http

before that lets create some ui for http demonstration

TextEditingController _controller = new TextEditingController();

String numbersStory = "";

String baseUrl = "http://numbersapi.com/";



TextStyle buttonTextStyle = TextStyle(

color: Colors.white,

fontSize: 16,

);

TextStyle textTextStyle = TextStyle(

fontSize: 16,

); @override

Widget build(BuildContext context) {

return SafeArea(

child: Scaffold(

appBar: AppBar(

title: Text("Http Example"),

),

body: Column(

children: <Widget>[

Container(

padding: EdgeInsets.all(16),

child: Text(

"$numbersStory",

style: textTextStyle,

),

),

Container(

margin: EdgeInsets.only(top: 24, left: 16, right: 16),

decoration: BoxDecoration(

border: Border.all(color: Colors.deepOrange),

borderRadius: BorderRadius.all(Radius.circular(16)),

),

child: TextField(

controller: _controller,

textInputAction: TextInputAction.next,

textAlign: TextAlign.center,

decoration: InputDecoration(

icon: Padding(

padding: const EdgeInsets.all(8.0),

child: Icon(

Icons.change_history,

color: Color.fromARGB(0xff, 0xf0, 0x7d, 0x00),

),

),

//#f07d00

hintMaxLines: 1,

border: InputBorder.none,

hintText: "Any number",

),

style: TextStyle(

color: Colors.black,

fontSize: 20,

fontWeight: FontWeight.w300),

onChanged: (v) {

makeHttpCall();

},

keyboardType: TextInputType.number,

),

),

SizedBox(height: 16),

RaisedButton(

color: Colors.blue,

splashColor: Colors.blue.shade300,

onPressed: () {

makeHttpCall();

},

child: Container(

padding: EdgeInsets.all(16),

child: Text(

"Submit".toUpperCase(),

style: buttonTextStyle,

)),

)

],

)),

);

}



We are taking input number to show number’s history.

On press of submit button we are calling makeHttpCall() function to execute http call and show its result in text view.

To make http call we will required url. we can also provide body for post and put request. We can also pass header.

makeHttpCall() async {

String number = _controller.text;

var response = await http.get("$baseUrl$number");

numbersStory = response.body;

setState(() {});

}

On response from api we take out our data from response.body.

After that we update numbersStory value in view.

This was so simple get api call. In next article I’ll post complex http requests.

Stay tuned
Getx lightweight all in one package State Management, Navigation Manger, and Dependency Manager.
Tags: iOS, Getx, Andrid, Flutter, Dart

State management

Simple State Manager: It will update UI only when manually calling update methods (like setState).

The simple State Manager will be using.

GetBuilder()

2) Reactive State Manager-: It will listen for a change in event or variable and when an event occurs it will automatically Update UI.

Reactive State Manager will be using

Obx

GetX

Now let’s take the counter app example will be using a reactive approach.

Firstly you need to define GetX Controller

Here we have two function increment and decrement and getter for current value.

On Button click call controller increment method and wrap text widget with obx

Here I have wrapped my text widget with an obx widget so when any change occurs then our UI will get updated automatically.

You can also use

GetX<CounterController>(

builder: (controller) => Text(

'${controller.currentCount}',

style: Theme.of(context).textTheme.headline4,

)),

In Getx you don’t need to define the controller at the top level.

Which one to Use

GetBuilder

Use it wherever you would use setState.

Much less Ram

GetX.

It redraws the widget only when the value of the variable is changed.

when you want to take advantage of the reactive approach.

var count=0;

count++ //at that time widget will redraws

Obx
Day 2 — What is StatelessWidget and an example of how it works
By: Gürkan Fikret Günak
Tags: Google, Fluttre, Code, Dart, Coding

Hello,💙

We continue where we left off. Today we will examine the StatelessWidget structure with you. I am aware that many read StatelfulWidget and StatelessWidget made mistakes by falling into a dilemma about the concept.

What is StatelessWidget?

It helps the structures inside to continue their construction efficiently without any change. It will also help about the permanence and continuity of the application performance. Why there may be too much in the Flutter application developer kit, they are divided into two in their content and dynamically. If we want the values ​​in it to be fixed while designing an interface, it is best to use the StatelessWidget. This will help us develop our application,

Let’s look at the source codes in more detail,

It has an inclusive color when we meet. This color will not change the code conversion within the application in any way. Naturally it makes sense to use the StatelessWidget tool here,

From another point of view, let’s examine the code below to better understand vehicle construction.

We define 2 parameters, one of them will be the color and the other will be the vehicle to work. The reason I do this is to realize that the tool we have built is not written over and over again, but rather by writing it as a single blog, providing us with practical in continuous use.

In this way, we will now define a practical way for more than one use. StatelessWidget is perfect for us when you want to use our fixed values in our interfaces as we explained at the beginning.

Summary

It is useful to say that it is a very good build for structures with static designs. Especially when creating content such as notification information and guide information on some pages, the most ideal structures can be tried.

#dart #flutter #google
Figma to Flutter: Parabeac-Core v1.2
By: Ivan Huerta
Tags: Open Source, Figma, Design, Flutter, Dart

We’re so excited to release Parabeac-Core v1.2! We’ve been hard at work getting support for Figma out as many developers have been requesting this. Meanwhile, we have been blown away by the support of many of the developers in our community. Even though this is only our 3rd release, we get to announce the features & bug fixes the community has been able to add! See below:

Fun issue we ran into - It seemed like Figma decided to change their API to using http2 in the middle of our development. :))

Support for Figma to Flutter Code

Support for WSL2 (Windows)

Various Code Refactors

Fresh Eggs — DatePicker + TextFields

Additions 2–4 were all driven by the community!

Support for Figma to Flutter Code

So many developers have asked us to support Figma. Given Figma is free for individuals, we’re so happy to have support for Figma now. We’ll be working on design to code fidelity & testing on Parabeac-Core for the next couple of weeks to improve the quality of output for both Sketch & Figma.

Doc Support for WSL2 (Windows)

Thanks to our amazing contributors, Parabeac-Core has Windows support through the Windows Subsystem for Linux (WSL2)! We added a walkthrough guide on how to set up WSL2 with Ubuntu and install the necessary dependencies to run parabeac-core. We’re excited to expand into more devices and to hear from the Windows community! Check out the guide here! Thanks to @roel-de-vries, @Gulianrdgd, @snwagbata for putting together the guide!

Various Code Refactors & Improvements

Shout out to

@haardikdharma for taking on several issues & cleaning up the codebase!

@snwagbata for adding ArgParser support to make it very easy to add & parse more CLI arguments!

@roel-de-vries for creating & fixing the issues he found!

Fresh Eggs

Parabeac-Core has two new eggs that you can use, thanks to the contribributors who made them!

With this egg you can now create text fields to be exported from Sketch/Figma to Flutter. You can also set the type of keyboard you want in case you are creating an ‘email’ textfield or ‘password’ textfield.

With this egg, you can create a button that instantiates a Date Picker! Aswin is putting together a guide on how to use it, so stay tuned!

Upcoming

I just want to quickly thank again all the community support we’ve gotten in the past month, we’re rewarding early contributors with a limited edition Parabeac T-Shirt. (Which came out sick) You can see more info on our Hacktoberfest post here. We’ll be working hard on improving the design to code fidelity & doing some refactors around eggs & other items. We really want the code export to be able to support different state management systems that developers use. Thanks for reading!

Originally posted at: https://dev.to/parabeac/figma-to-flutter-parabeac-core-v1-2-45an
Readymade Grocery App Version 2.2.0 has Released
By: Ionic Firebase App
Tags: Startup, Grocery Shopping, Flutter, Dart, Apps

We are delighted to announce that we have launched our Readymade Grocery app Version 2.2.0. We have released the most requested features in our Grocery Readymade app — All in one solution package.

Version 2.2.0 update 🎁 includes:

✅ Signup/Signin with the Mobile app.

✅ Pre-Defined Countries code for Mobile app registration.

✅Mobile Number OTP verification.

✅ Wallet.

✅ Multiple image uploads for one product.

✅Out of Stock notifications and Separate Menu tab in CMS.

New Feature added to Readymade Grocery app.

Enhancement:

✅ Invoice.

✅ Add to cart design.

✅ UI Enhances.

✅ Related product with animation/Slide.

👉 This all in the package contains the following apps:

User Mobile app for iOS and Android

Delivery app for iOS and Andriod

eCommerce web app

Admin Dashboard

👉 Live Apps Demo Link:

✅ User app:

👉 iOS: https://apps.apple.com/in/app/readymade-grocery-app/id1506920690

👉 Android: https://play.google.com/store/apps/details?id=com.ionicfirebaseapp.readymadegroceryuserapp

✅ Delivery Boy app:

👉 iOS: https://apps.apple.com/in/app/readymade-grocery-delivery-app/id1506770041

👉 Android: https://play.google.com/store/apps/details?id=com.ionicfirebaseapp.grocerydelivery

👉 Web App: https://grocery-web.ionicfirebaseapp.com/

👉 Admin Dashboard: https://grocery-dashboard.ionicfirebaseapp.com/

Let us know your feedback and experience with our new update known as version 2.2.0.

Check out docs for details:

But just in case it’s more than that, is there anything I can do to make your App experience the best it can be? I’d love to hear what you think. Just reply to this email and we can work it out 😊

Technologies we used

Flutter / Dart for Mobile app

Angular and BootStrap for Webapp

Angular and Nodejs for Backend

MongoDB is a database.

About Flutter: Flutter is an open-source UI software development kit created by Google. It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web from a single codebase. Check the details about Flutter flutter.dev.

Angular: Angular is a TypeScript-based open-source web application framework led by the Angular Team at Google and by a community of individuals and corporations. Angular is a complete rewrite from the same team that built AngularJS. Read more about angular at angular.io

Nodejs: It is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js is an open-source, cross-platform, back-end, JavaScript runtime environment that executes JavaScript code outside a web browser. Read more about Nodejs at nodejs.org.

MongoDB: MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License. Read more details on MongoDB at mongodb.com
Introduction to Dart
By: Akshay K. Saxena
Tags: Development, Linuxworld, Flutter, Dart, Vimal Daga

Dart is a client-optimized programming language for apps on multiple platforms. It is developed by Google and is used to build mobile, desktop, server, and web applications. Dart is an object-oriented, class-based, garbage-collected language with C-style syntax. Dart can compile to either native code or JavaScript.

How to install Dart ?

There are mainly two ways you can install dart in your operating system.

Using CMD Using Web UI

Installation of Dart using CMD

Installation using CMD is very simple the only thing you need is “Chocolatey (choco): A software management solution” should be already installed in your system.

Personally i always like to install or perform task using cmd the best part of using cmd is you do not need to set the path in environmental variable again and again, it automatically set update/add the path in environmental variable.

To check that choco installed in your system or not run choco command ypu will see the the chocolatey version as output.

Remark: Choco is not installed and you want to install follow two steps only.

i) Run Command Prompt as administrator.

ii) Then in CMD run this command

@”%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe” -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command “[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1'))" && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”

Choco will install in your system.

If Chocolatey is installed in your system then follow these steps to downloads Dart

Step 1. Run Command Prompt as administrator.

Step 2. Run command choco install dart-sdk and after waiting for few seconds you will see dart in downloading in your cmd (Approx dart sdk size is 209mb)

Step 3. After restarting the command prompt run dart you will see that dart is installed successfully.

Installation of Dart using Web UI

Step 1. Go to https://dart.dev/tools/sdk/archive and download stable channel zip file on the basis of operating system configuration.

Step 2. After successfully downloading extract to in the desired location.

Step 3. After this go to you_path\dart-sdk\bin and copy this path.

The path you select for sdk tools you should be add in the environment variable.

Step 4. To updating the path go to environment variable and add that path.

Step 5. After adding the path go to cmd and run dart .

To check the version run dart --version.

Thank You !!

If you found this article helpful please give an impression.

Suggestion are always welcomed.

Akshay K. Saxena

To connected with me click here.
How To Play Darts Today. Let´s hop over to how you can and…
Tags: Darts Player, Dart

This article is focused on some essential and fundamentals to play darts. As you may already know, there are different methods to throw a dart, and there are also many ways to throw it completely wrong. Usually, you´ll have to throw from around 7 feet 9. It does not matter if you play in pubs, restaurants at home or even in a big tournament, because the strategy is always the same. Normally, 7 to 9 feet is the best throwing distance in every single game. Now, if you contemplate practicing the game at home, make sure to mark on the ground where you should ALWAYS stand.

Let´s hop over to how you can and should throw darts. You have a stem and a stud. The goal is to hold the stem and the stud the way it is most profitable for your scores. The wrong way to throw a dart is to hold it exactly on the tip or throw it from behind. Newbie and many people get fancy and throw the dart from behind. But what does this actually produce or to what does this lead? — To learn the techniques the wrong and in an ineffective way. You do not want to implement such fancy stuff, or try to stand out of the crowd by developing your own throwing techniques, besides, this can get very dangerous! Unless you are an expert, are trying to practice tricks for a tournament, you do not necessarily have to go with such experiments.

Only hold it from the stem and throw it straightly. Hold darts with two fingers on the stem, and the thumb on the stem (back). Most people who start of and have no idea on how to ideally use it, hold the dart up to the ear and release right after that. This gives you zero leverage, aim and technique. You want to exploit proven techniques.

If you want to train the right approach, which I highly recommend you do, than the best way to go about is to purchased yourself a dart board, get your hands on somebody who is versed in the game, and simple start the first match right now. Even though this might have been intimidating because of X and Y, does not mean that you´re unable to learn or apply the correct technique. Make sure to start accordingly, learn how to hold darts, so that the first game shall begin!

You can read this digital book where secrets from the game’s professionals
Something you should know before flutter development
Tags: Google, Flutter, Dev, Dart, Cross Platform

Building cross-platform is a common task for frond-end development in nowadays. Because you want your products for customers to frequently use.

Unlike apps on the web , people need to remember the domain name of the web-app. Apps that user download to their devices like phone or computer likely the most perfect way to reach the goal.

As for developers their are some good tools to help us to develop these applications. One of them is Flutter which from google, an open-source cross-platform user interface framework both support windows android and IOS.

It is very benefit for developers who target their product to those different platforms.

But before you choose flutter as your main front-end develop framework, something you should mind, and no one would tell you that.

First, the compile program of each platform is based on third part tools but not flutter it self which means you should install Visual Studio with C++ desktop component in your windows pc if you want build your app to windows platform. And, flutter only support 64 bit windows operation system for windows platform. And if you want build IOS applications you must have an MAC computer like MacBook with XCode installed.

Second, except I discussed above, you should develop each platform specify features for different platform, for example if you want read or write files. Fortunately their are many plugins in pub.dev can help use to do this, but some features you should do with your own hands. And some of these plugins are not perfect for every platform. And if your application should not have platform interactive abilities your situation will be many better and much “cross-platform”.

One last things is that flutter’s current web support was slow, so if you want develop web applications you may want to choose other technology.

Even though flutter is not really cross platform and not really perfect, but with dart language and pub web community support it truly helped our develop process speed up a lot. It cost you less time to learn and its easy to customize to capable with your deign and beautiful.