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
List<Widget> _buildPageIndicator() { | |
List<Widget> list = []; | |
for (int i = 0; i < _numPages; i++) | |
//_numPages is the number of pages in Onboarding | |
{ | |
list.add(i == _currentPage ? _indicator(true) : _indicator(false)); | |
} | |
return list; | |
} |
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/material.dart'; | |
import 'package:webview_flutter/webview_flutter.dart'; | |
class WebViewContainer extends StatefulWidget { | |
final url; | |
WebViewContainer(this.url); | |
@override | |
createState() => _WebViewContainerState(this.url); | |
} | |
class _WebViewContainerState extends State<WebViewContainer> { | |
var _url; |
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
{ | |
"embeddings": [ | |
{ | |
"tensorName": "My tensor", | |
"tensorShape": [ | |
1000, | |
50 | |
], | |
"tensorPath": "https://raw.githubusercontent.com/.../tensors.tsv", | |
"metadataPath": "https://raw.githubusercontent.com/.../optional.metadata.tsv" |
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/foundation.dart'; | |
class MySchedule extends ChangeNotifier { | |
double _stateManagementValue = 0; | |
double get stateManagementValue => _stateManagementValue; | |
set stateManagementValue(double value) { | |
_stateManagementValue = 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
import 'package:flutter/material.dart'; | |
import 'package:state_management/MySchedule.dart'; | |
import 'package:pie_chart/pie_chart.dart'; | |
import 'package:provider/provider.dart'; | |
class MyChart extends StatefulWidget { | |
@override | |
_MyChartState createState() => _MyChartState(); | |
} |
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
rules_version = '2'; | |
service firebase.storage { | |
match /b/{bucket}/o { | |
match /{allPaths=**} { | |
allow read, write: if 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
Widget build(BuildContext context) { | |
Future getImage() async { | |
var image = await ImagePicker.pickImage(source: ImageSource.gallery); | |
setState(() { | |
_image = image; | |
print('Image Path $_image'); | |
}); |
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
if (snapshot.error == null) { | |
final String downloadUrl = | |
await snapshot.ref.getDownloadURL(); | |
await Firestore.instance | |
.collection("images") | |
.add({"url": downloadUrl, "name": imageName}); | |
setState(() { | |
isLoading = false; | |
}); | |
final snackBar = |
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
Firestore.instance | |
.collection("images") | |
.where("name", isEqualTo: "travelimage4") | |
.getDocuments() | |
.then((res) { | |
res.documents.forEach((result) { | |
FirebaseStorage.instance | |
.getReferenceFromUrl(result.data["url"]) | |
.then((res) { | |
res.delete().then((res) { |
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'; | |
class AdManager { | |
static String get appId { | |
if (Platform.isAndroid) { | |
return "<YOUR_ANDROID_ADMOB_APP_ID>"; | |
} else if (Platform.isIOS) { | |
return "<YOUR_IOS_ADMOB_APP_ID>"; | |
} else { |
OlderNewer