This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DropdownButton( | |
iconSize: 45.0, | |
items: <String>[ | |
'MTN', | |
'TIGO', | |
'AIRTEL'].map((String value) { | |
return DropdownMenuItem<String>( | |
value: value, | |
child: Text(value), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="com.example.myapplication"> | |
//add Internet permission | |
<uses-permission android:name="android.permission.INTERNET"/> | |
<application | |
android:allowBackup="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
class ProfilePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar(), | |
body: ListView( | |
children: <Widget>[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:meler/repositories/user.repository.dart'; | |
class LoginModel with ChangeNotifier { | |
TextEditingController _emailCtrl = TextEditingController(); | |
TextEditingController _passwordCtrl = TextEditingController(); | |
bool _isLoading = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:http/http.dart' as http; | |
import 'package:http_parser/http_parser.dart'; | |
import 'package:path/path.dart'; | |
Future<http.Response> imageUploadRequest({@required File imageFile}) async { | |
Map<String, String> headers = {"Accept": "application/json"}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scaffold( | |
appBar: AppBar( | |
title: AutoSizeText('Doctors List'), | |
bottom: PreferredSize(child: Row(children: <Widget>[ | |
customButton((){},Icons.filter,'Filter'), | |
customButton((){},Icons.filter,'Filter'), | |
customButton((){},Icons.filter,'Filter'), | |
],), preferredSize: Size.fromHeight(70)), | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```dart | |
import 'package:flutter/material.dart'; | |
Color fromHex(String hexString) { | |
final buffer = StringBuffer(); | |
if (hexString.length == 6 || hexString.length == 7) buffer.write('ff'); | |
buffer.write(hexString.replaceFirst('#', '')); | |
return Color(int.parse(buffer.toString(), radix: 16)); | |
} | |
```dart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add to pubspec: material_segmented_control: ^2.0.9 | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter_icons/flutter_icons.dart'; | |
import 'package:material_segmented_control/material_segmented_control.dart'; | |
class TeamDashboardPage extends StatefulWidget { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```dart | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
OlderNewer