Saturday, August 29, 2020

Custom Fonts | Icons | Google Fonts

.........................................................................................................................................................................................................................................
Example :#1 [Google Fonts]

Download links as below
https://fonts.google.com/

...................................
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Home(),
    );
  }
}
class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(  
        title: Text('FontAwesome'),
        centerTitle: true,
      ),
      body: Center(   
        child: Column(  
          children: [
            Text('Hello', style: TextStyle(fontFamily: 'Langar', fontSize: 30)),
            Text('Hello',style: TextStyle(fontFamily: 'Dancing', fontSize: 50)),
          ],
        ),
      ),
    );
  }
}

Happy Coding :)
.........................................................................................................................................................................................................................................
Example :#2 [ Google Fonts]

Library
https://pub.dev/packages/google_fonts/install
  google_fonts: ^1.1.1

.....................................
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

void main() {
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Home(),
    );
  }
}
class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(  
        title: Text('FontAwesome'),
        centerTitle: true,
      ),
      body: Center(   
        child: Column(  
          children: [
            Text('Gogole Fonts', style: GoogleFonts.pacifico()),
          ],
        ),
      ),
    );
  }
}
Happy Coding :)
.........................................................................................................................................................................................................................................
Example :#3 [ FontAwesome flutter Icon]

Library
https://pub.dev/packages/font_awesome_flutter/install
  font_awesome_flutter: ^8.10.1

.....................................
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

void main() {
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Home(),
    );
  }
}
class Home extends StatefulWidget {
  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(  
        title: Text('FontAwesome'),
        centerTitle: true,
      ),
      body: Center(   
        child: Column(  
          children: [
            Icon(FontAwesomeIcons.android, size: 50),
            Icon(FontAwesomeIcons.addressBook, size: 50),
            Icon(FontAwesomeIcons.airFreshener, size: 50),
            Icon(FontAwesomeIcons.appStoreIos, size: 50),
            Icon(FontAwesomeIcons.bookMedical, size: 50)
          ],
        ),
      ),
    );
  }
}

Happy Coding :)
.........................................................................................................................................................................................................................................
Example :#4 []



Happy Coding :)
.........................................................................................................................................................................................................................................
Example :#5 []



Happy Coding :)
.........................................................................................................................................................................................................................................
Example :#6 []




Happy Coding :)
.........................................................................................................................................................................................................................................
Example :#7 []

Happy Coding :)

Tuesday, August 25, 2020

ListView, ListTitle, ListView.builder

 ListView, ListTitle, ListView.builder 

Sample Code Snippet

Following is a sample code snippet to show list of items as a list of widgets in a ListView dynamically.

List<E> items = <E>[...];
ListView.builder(
  itemCount: items.length,
  itemBuilder: (BuildContext context, int index) {
    return <Widget>;
  }
)

....................................................................................................................................................................................................................................

Example :#1

import 'package:flutter/material.dart';

void main()=>runApp(MyApp());

class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context){
return MaterialApp(
home: MyHome(),
);
}
}
class MyHome extends StatefulWidget{
@override
MyHomeState createState()=>MyHomeState();
}
class MyHomeState extends State<MyHome>{
@override
Widget build(BuildContext context){
return Scaffold(
appBar: AppBar(),
body:ListView(
children: <Widget>[
ListTile(
title: Text('Hello'),
),
ListTile(
title: Text('Hello'),
),
],
)
);
}
}


....................................................................................................................................................................................................................................
Example :#2[ListTitle.divideTiles]

import 'package:flutter/material.dart';

void main()=>runApp(MyApp());

class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context){
return MaterialApp(
home: MyHome(),
);
}
}
class MyHome extends StatefulWidget{
@override
MyHomeState createState()=>MyHomeState();
}
class MyHomeState extends State<MyHome>{
@override
Widget build(BuildContext context){
return Scaffold(
appBar: AppBar(),
body:ListView(
children: ListTile.divideTiles(
context: context,
tiles: [
ListTile(
title: Text('Hello'),
),
ListTile(
title: Text('World'),
),
ListTile(
title: Text('Hello World'),
),
]
).toList()
)
);
}
}

....................................................................................................................................................................................................................................
Example :#3

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHome(),
);
}
}

class MyHome extends StatefulWidget {
@override
MyHomeState createState() => MyHomeState();
}

class MyHomeState extends State<MyHome> {
final europeanCountries = [
'Albania',
'Andorra',
'Armenia',
'Austria',
'Azerbaijan',
'Belarus',
'Belgium',
'Bosnia and Herzegovina',
'Bulgaria',
'Croatia',
'Cyprus',
'Czech Republic',
'Denmark',
'Estonia',
'Finland',
'France',
'Georgia',
'Germany',
'Greece',
'Hungary',
'Iceland',
'Ireland',
'Italy',
'Kazakhstan',
'Kosovo',
'Latvia',
'Liechtenstein',
'Lithuania',
'Luxembourg',
'Macedonia',
'Malta',
'Moldova',
'Monaco',
'Montenegro',
'Netherlands',
'Norway',
'Poland',
'Portugal',
'Romania',
'Russia',
'San Marino',
'Serbia',
'Slovakia',
'Slovenia',
'Spain',
'Sweden',
'Switzerland',
'Turkey',
'Ukraine',
'United Kingdom',
'Vatican City'
];

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: ListView.separated(
itemCount: 100,
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.all(10),
//color: Colors.red,
child: ListTile(
title: Text(
europeanCountries[index],
style: TextStyle(color: Colors.white),
)
),
);
},
separatorBuilder: (context, index){
return Divider();
},
),
);
}
}
....................................................................................................................................................................................................................................
Example :#4
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHome(),
);
}
}

class MyHome extends StatefulWidget {
@override
MyHomeState createState() => MyHomeState();
}

class MyHomeState extends State<MyHome> {
final europeanCountries = [
'Albania',
'Andorra',
'Armenia',
'Austria',
'Azerbaijan',
'Belarus',
'Belgium',
'Bosnia and Herzegovina',
'Bulgaria',
'Croatia',
'Cyprus',
'Czech Republic',
'Denmark',
'Estonia',
'Finland',
'France',
'Georgia',
'Germany',
'Greece',
'Hungary',
'Iceland',
'Ireland',
'Italy',
'Kazakhstan',
'Kosovo',
'Latvia',
'Liechtenstein',
'Lithuania',
'Luxembourg',
'Macedonia',
'Malta',
'Moldova',
'Monaco',
'Montenegro',
'Netherlands',
'Norway',
'Poland',
'Portugal',
'Romania',
'Russia',
'San Marino',
'Serbia',
'Slovakia',
'Slovenia',
'Spain',
'Sweden',
'Switzerland',
'Turkey',
'Ukraine',
'United Kingdom',
'Vatican City'
];

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: ListView (
children: <Widget>[
ListTile(
leading: Icon(Icons.wb_sunny),
title: Text('Sun'),
trailing: Icon(Icons.keyboard_arrow_right),
),
ListTile(
leading: Icon(Icons.brightness_3),
title: Text('Moon'),
trailing: Icon(Icons.keyboard_arrow_right),

),
ListTile(
leading: Icon(Icons.star),
title: Text('Star'),
trailing: Icon(Icons.keyboard_arrow_right),
),
],
),
);
}
}




....................................................................................................................................................................................................................................
Example :#5
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHome(),
);
}
}

class MyHome extends StatefulWidget {
@override
MyHomeState createState() => MyHomeState();
}

class MyHomeState extends State<MyHome> {
final titles = ['bike', 'boat', 'bus', 'car',
'railway', 'run', 'subway', 'transit', 'walk'];
final icons = [Icons.directions_bike, Icons.directions_boat,
Icons.directions_bus, Icons.directions_car, Icons.directions_railway,
Icons.directions_run, Icons.directions_subway, Icons.directions_transit,
Icons.directions_walk];

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: ListView.builder (
itemCount: titles.length,
itemBuilder: (context, index){
return Card(
child: ListTile(
leading: Icon(icons[index]),
title: Text(titles[index]),

),

);
},
)
);
}
}


....................................................................................................................................................................................................................................
Example :#6
import 'package:flutter/material.dart';
void main()=>runApp(MyApp());

class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context){
return MaterialApp(
home: Home(),
);
}
}
class Home extends StatefulWidget{
@override
HomeState createState()=>HomeState();
}
class HomeState extends State<Home>{
@override
Widget build(BuildContext context){
return Scaffold(
body:ListView.builder(
itemBuilder: (context, index){
return Card(
child: InkWell(
onTap: (){
print('Hello World');
},
child: Padding(
padding: EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Column(),
Column(),
],
),
),
),
);
}
) ,
);
}
}

....................................................................................................................................................................................................................................
Example :#7
import 'package:flutter/material.dart';
void main()=>runApp(MyApp());

class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context){
return MaterialApp(
home: Home(),
);
}
}
class Home extends StatefulWidget{
@override
HomeState createState()=>HomeState();
}
class HomeState extends State<Home>{
List<String> titles = ['Sun', 'Moon', 'Star'];
@override
Widget build(BuildContext context){
return Scaffold(
body:ListView.builder(
itemCount: titles.length,
itemBuilder: (context, index){
final item = titles[index];
return Card(
child: ListTile(
title: Text(item),
onTap: (){
setState(() {
titles.insert(index, 'Hello World');
});
},
onLongPress: (){
setState(() {
titles.removeAt(index);
});
},
),
);
},
) ,
);
}
}
....................................................................................................................................................................................................................................
Example :#8

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Home(),
    );
  }
}

class Home extends StatefulWidget {
  @override
  HomeState createState() => HomeState();
}

class HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('List View'),
      ),
      body: _listbody(),
    );
  }

  ListView _listbody() {
    return ListView.builder(
        itemCount: 10,
        itemBuilder: (context, index) {
          return ListTile(
            leading: Icon(Icons.thumb_up),
            title: Text('List one  ${index}'),
            subtitle: Text('Subtitle'),
            trailing: IconButton(
              onPressed: () {
                Navigator.push(context,
                    MaterialPageRoute(builder: (context) => DetailPage(index)));
              },
              icon: Icon(Icons.arrow_forward),
            ),
            onTap: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => DetailPage(index)));
            },
          );
        });
  }
}

class DetailPage extends StatelessWidget {
  final int index;
  DetailPage(this.index);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('DetailsPage'),
      ),
      body: Center(
        child: Text('Details page${index}'),
      ),
    );
  }
}



....................................................................................................................................................................................................................................
Example :#9

import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
        home: MyApp(
      title: 'List View',
    )));

class MyApp extends StatefulWidget {
  MyApp({Key key, this.title}) : super(key: key);
  final String title;
  @override
  MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    List<String> list = [];
    for (int i = 0; i < 10; i++) {
      list.add('Hello Worlddddd $i');
    }
    List<Widget> mylist = list.map((e) => Text(e)).toList();
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ListView(
        children: mylist
      ),
    );
  }
}
....................................................................................................................................................................................................................................
Example :#10
import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(
        home: MyApp(
      title: 'List View',
    )));

class MyApp extends StatefulWidget {
  MyApp({Key key, this.title}) : super(key: key);
  final String title;
  @override
  MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    List<String> list = [];
    for (int i = 0; i < 20; i++) {
      list.add('Hello World$i');
    }
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ListView.builder(
        scrollDirection: Axis.vertical,
        itemCount: list.length,
        itemBuilder: (context, int index) {
          return Container(
            color: index % 2 == 0 ? Colors.grey : Colors.white,
            child: ListTile(
              leading: Icon(Icons.wb_sunny),
              trailing: Icon(Icons.arrow_forward),
              title: Text('Test ${list[index]}'),
            ),
          );
        },
      ),
    );
  }
}
....................................................................................................................................................................................................................................
Example :#11 [Listview]

import 'package:flutter/material.dart';
void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: Home());
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Hello'),
      ),
      body:ListView(
        children: [
             Column(  
            children: [
              Container(
        width: 200,
        height: 400,
        color: Colors.amberAccent,
              ),
              SizedBox(width: 10),
              Container(
        width: 200,
        height: 300,
        color: Colors.red,
              ),
            ],
          ),
        ],
      ),
    );
  }
}
Happy Coding :)
....................................................................................................................................................................................................................................
Example :#12 [ SingleChildScrollView ]
import 'package:flutter/material.dart';
void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: Home());
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Hello'),
      ),
      body:SingleChildScrollView(
        scrollDirection: Axis.vertical,
           child: Column(  
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Container(
              width: 250,
              height: 250,
              color: Colors.red,
            ),
            SizedBox(height: 10.0),
            Container(
              width: 250,
              height: 250,
              color: Colors.yellow,
            ),
            SizedBox(height: 10.0),
            Container(
              width: 250,
              height: 250,
              color: Colors.green,
            ),
          ],
        ),
      )
    );
  }
}


Happy Coding
....................................................................................................................................................................................................................................
Example :#13 [ SingleChildScrollView ]
import 'package:flutter/material.dart';
void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: Home());
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Hello'),
      ),
      body:SingleChildScrollView(
        scrollDirection: Axis.horizontal,
          child: Row(  
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Container(
              width: 250,
              height: 250,
              color: Colors.red,
            ),
            SizedBox(height: 10.0),
            Container(
              width: 250,
              height: 250,
              color: Colors.yellow,
            ),
            SizedBox(height: 10.0),
            Container(
              width: 250,
              height: 250,
              color: Colors.green,
            ),
          ],
        ),
      )
    );
  }
}


Happy Coding :)
....................................................................................................................................................................................................................................
Example :#14 [ SingleChildScrollView ]

....................................................................................................................................................................................................................................
Example :#15 [ SingleChildScrollView ]












Wednesday, August 19, 2020

Gradient

Gradient
...................................................................................................................................................................................................................................................
Example :#1 [LinearGradient]

import 'package:flutter/material.dart';
void main()=>runApp(MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget{
@override
MyAppState createState()=>MyAppState();
}
class MyAppState extends State<MyApp>{
@override
Widget build(BuildContext context){
return Scaffold(
body:
Stack(
fit: StackFit.
expand,
children: <Widget>[
Container(
decoration:
BoxDecoration(
gradient:
LinearGradient(
colors: [Colors.
orange, Colors.red],
begin: Alignment.
centerLeft,
end: Alignment.
centerRight

)
),
)
],
),
);
}
}

...................................................................................................................................................................................................................................................
Example :#2[RadialGradient]

import 'package:flutter/material.dart';
void main()=>runApp(MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget{
@override
MyAppState createState()=>MyAppState();
}
class MyAppState extends State<MyApp>{
@override
Widget build(BuildContext context){
return Scaffold(
body: Stack(
fit: StackFit.expand,
children: <Widget>[
Container(
decoration: BoxDecoration(
gradient: RadialGradient(
colors: [Colors.orange, Colors.deepOrange],
radius: 1.0
)
),
)
],
),
);
}
}

...................................................................................................................................................................................................................................................
Example :#3


...................................................................................................................................................................................................................................................
Example :#4

Monday, August 17, 2020

Button

.....................................................................................................................................................................................................................................
Example:#1

As per Material Components Widgets Document below are the types of Button.
  1. RaisedButton
  2. FlatButton
  3. IconButton
  4. FloatingActionButton
  5. ButtonBar
  6. InkWell
  7. GestureDetector
  8. MaterialButton
  9. OutlineButton
  10. DropdownButton
  11. PopupMenuButton
  12. RadioButton
  13. RadioListTileButton





.....................................................................................................................................................................................................................................
Example:#2[FlatButton, RaisedButton]

Raised button have a little bit shadow, there is no difference between each others

1.  FlatButton
Simple button that has not much highlighted decoration.
- Mostly use on toolbar, dialog and etc.
- FlatButton has two required property child and onPressed() Lets look at below example.
- it is a text label button that does not have much decoration and displayed without any elevation.

        FlatButton(
          child: Text('I am FlatButton'),
          onPressed: (){
            print('You tapped on FlatButton');
          },
        )
  


import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(home: MyApp()));
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: FlatButton.icon(
onPressed: (){},
textColor: Colors.white,
color: Colors.orange,
icon: Icon(Icons.payment),
label: Text('Make Payment'),
),
)

);
}
}

.....................................................................................................................................................................................................................................
Example:#3[Button Bar]

import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget {
@override
MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return Scaffold(
body:
Column(
children: <Widget>[
SizedBox(height: 100),
Container(
child: ButtonBar(
children: <Widget>[
FlatButton(
onPressed: (){},
color: Colors.
red,
child:
Row(
children: <Widget>[
Text('Hello'),
Icon(Icons.dashboard)
],
),
)
],
),
)
],
),
);
}
}

.....................................................................................................................................................................................................................................
Example:#4 [inkWell]

1. A rectangle area of the material that response on touch.
2. Simply you can wrap it to any material widget so that will be clickable.

InkWell(
   onTap: () {
     print('Clicked on URL by InkWell Widget');
   },
   child: Text("https://quickstartflutterdart.blogspot.in/",
       style: TextStyle(
         color: Colors.blue,
         fontSize: 13,
         decoration: TextDecoration.underline)),
    );

.....................................................................................................................................................................................................................................
Example:#5 [GestureDector]

1. It’s work same like InkWell widget but it has more powerful click events.
2. It has many click/drag and other events.

GestureDetector(
      onTap: () {
        print('Clicked on URL by GestureDetector Widget');
      },
      child: Text("https://quickstartflutterdart.blogspot.in/", 
        style: TextStyle(
        color: Colors.blue, 
        fontSize: 13,
        decoration: TextDecoration.underline)
      ),
    );

.....................................................................................................................................................................................................................................
Example:#5 [ Floating Action Button ]

A FAB button is a circular icon button that triggers the primary action in our application.

There are two types of Floating Action Button 
FloatingActionButton: It creates a simple circular floating button with a child widget inside it. It must have a child parameter to display a widget.

FloatingActionButton.extended: It creates a wide floating button along with an icon and a label inside it. Instead of a child, it uses labels and icon parameters.

      floatingActionButton: FloatingActionButton(  
        child: Icon(Icons.navigation),  
        backgroundColor: Colors.green,  
        foregroundColor: Colors.white,  
        onPressed: () => {},  
      ),  

      floatingActionButton:FloatingActionButton.extended(  
        onPressed: () {},  
        icon: Icon(Icons.save),  
        label: Text("Save"),  
      ), 
    ),  
    );  




Container || Row||Column

 Container Widget









Happy Coding :)
.................................................................................................................................................................................................................................
Row  
TextDirection Propery
textDirection: TextDirection.rtl,

Code Here
Row(
  crossAxisAlignment: CrossAxisAlignment.center,
  textDirection: TextDirection.rtl,
  children: [
    Text(
      'Flutter',
      style: TextStyle(
        color: Colors.yellow,
        fontSize: 30.0
      ),
    ),
    Text(
      'Flutter',
      style: TextStyle(
          color: Colors.blue,
          fontSize: 20.0
      ),
    ),
  ],
);
Happy Coding :)
.................................................................................................................................................................................................................................
VerticalDirection Propery

  verticalDirection: VerticalDirection.up,
  verticalDirection: VerticalDirection.down,

Code Here
Row(
  crossAxisAlignment: CrossAxisAlignment.start,
  verticalDirection: VerticalDirection.down,
  children: [
    Text(
      'Flutter',
      style: TextStyle(
        color: Colors.yellow,
        fontSize: 30.0
      ),
    ),
    Text(
      'Flutter',
      style: TextStyle(
          color: Colors.blue,
          fontSize: 20.0
      ),
    ),
  ],
);

.................................................................................................................................................................................................................................



.................................................................................................................................................................................................................................


.................................................................................................................................................................................................................................


.................................................................................................................................................................................................................................


.................................................................................................................................................................................................................................