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:flutter/cupertino.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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'; | |
class ChartData { | |
final double x; | |
final double y; | |
ChartData(this.x, this.y); | |
} | |
void main() { | |
runApp(const MyApp()); |
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:flutter_test/flutter_test.dart'; | |
import 'package:integration_test/integration_test.dart'; | |
import 'package:your_app/main.dart'; // Update with the path to your main app file | |
void main() { | |
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | |
testWidgets('Login flow test', (WidgetTester tester) 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
@override | |
Path getClip(Size size) { | |
double radius = 50; | |
Path path = Path() | |
..lineTo(size.width - radius, 0) | |
..arcTo( | |
Rect.fromPoints( | |
Offset(size.width - radius, 0), Offset(size.width, radius)), // Rect |
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 'dart:ui' as ui; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
extension ToBitDescription on Widget { | |
Future<BitmapDescriptor> toBitmapDescriptor({Size? logicalSize, Size? imageSize, Duration waitToRender = const Duration(milliseconds: 300), TextDirection textDirection = TextDirection.ltr}) async { | |
final widget = RepaintBoundary( |
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
using System.Text.RegularExpressions; | |
public static class StringExtensions | |
{ | |
// remove double spaces | |
public static string RemoveExtraSpaces(this string sender, bool trimEnd = false) | |
{ | |
const RegexOptions options = RegexOptions.None; | |
var regex = new Regex("[ ]{2,}", options); | |
var result = regex.Replace(sender, " "); |
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 CategoryView extends StatefulWidget { | |
final bool isHomePage; | |
CategoryView({required this.isHomePage}); | |
@override | |
State<CategoryView> createState() => _CategoryViewState(); | |
} | |
class _CategoryViewState extends State<CategoryView> { |
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:flutter/cupertino.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>(); |
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'; | |
import 'package:flutter/material.dart'; | |
import 'dart:ui' as ui; | |
class ChartPage extends StatefulWidget { | |
const ChartPage({super.key}); | |
@override | |
State<ChartPage> createState() => _ChartPageState(); | |
} |
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 numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import folium | |
from js import fetch | |
import datetime as dt | |
import io | |
%matplotlib inline |
NewerOlder