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
class BottomBarScreen extends StatefulWidget { | |
@override | |
_BottomBarScreenState createState() => _BottomBarScreenState(); | |
} | |
class _BottomBarScreenState extends State<BottomBarScreen> { | |
int _currentIndex = 0; | |
final List<Widget> _children = [ | |
PlaceholderWidget(Colors.white), |
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
class SecondScreen extends StatefulWidget { | |
@override | |
_SecondScreenState createState() => _SecondScreenState(); | |
} | |
class _SecondScreenState extends State<SecondScreen> { | |
final TextEditingController _controller = TextEditingController(); | |
String savedText = ""; |
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
enum PhotoSource { ASSET, NETWORK } | |
enum PhotoStatus { LOADING, ERROR, LOADED } | |
class HomePage extends StatefulWidget { | |
@override | |
_HomePageState createState() => _HomePageState(); | |
} | |
class _HomePageState extends State<HomePage> { | |
PhotoSource photoSource; |
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
typedef Future<bool> OnSaveImage(String url); | |
enum Source { GALLERY, CAMERA, NONE } | |
class SingleImagePicker { | |
final PickImageSource pickImageSource; | |
final Function(String path) onImagePicked; | |
final Function(String downloadUrl) onImageSuccessfullySaved; | |
final OnSaveImage onSaveImage; | |
final Function(String message) onImageUploadFailed; |
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
class GetImagePermission { | |
bool granted = false; | |
Permission _permission; | |
final String subHeading; | |
GetImagePermission.gallery( | |
{this.subHeading = "Photos permission is needed to select photos"}) { | |
if (Platform.isIOS) { |
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' show Platform; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
class CustomDialog { | |
static void show( | |
context, | |
String heading, | |
String subHeading, |
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 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_icons/flutter_icons.dart'; | |
import '../main.dart'; | |
import 'get_image_permission.dart'; | |
import 'single_image_picker.dart'; | |
class AddAttachmentModalSheet extends StatefulWidget { | |
final Size screenSize; |
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:typed_data'; | |
import 'package:http/http.dart' as http; | |
import 'package:image_picker/image_picker.dart'; | |
class UploadFile { | |
bool success; | |
String message; | |
bool isUploaded; |
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
class GenerateImageUrl { | |
bool success; | |
String message; | |
bool isGenerated; | |
String uploadUrl; | |
String downloadUrl; | |
Future<void> call(String fileType) async { |
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
//Navigate | |
Abbreviation- navigate | |
Navigator.push( | |
context, | |
MaterialPageRoute( | |
builder: (context) =>$Page$(), | |
), | |
); |
NewerOlder