Skip to content

Instantly share code, notes, and snippets.

View kururu-abdo's full-sized avatar
😍
Learning

kururu kururu-abdo

😍
Learning
View GitHub Profile
@kururu-abdo
kururu-abdo / painter_line_chart.dart
Created December 4, 2024 15:25
painter_line_chart.dart
import 'package:flutter/material.dart';
class ChartData {
final double x;
final double y;
ChartData(this.x, this.y);
}
void main() {
runApp(const MyApp());
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 {
@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
@kururu-abdo
kururu-abdo / flutter_map_custom_marker.dart
Created April 7, 2024 23:33
flutter_map_custom_marker
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(
@kururu-abdo
kururu-abdo / Extensions.cs
Created March 21, 2024 20:27 — forked from karenpayneoregon/Extensions.cs
Working with strings and ternary operator
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, " ");
class CategoryView extends StatefulWidget {
final bool isHomePage;
CategoryView({required this.isHomePage});
@override
State<CategoryView> createState() => _CategoryViewState();
}
class _CategoryViewState extends State<CategoryView> {
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>();
@kururu-abdo
kururu-abdo / chart.dart
Created September 9, 2023 13:44
implement line chart with flutter
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();
}
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
# Import required libraries
import pandas as pd
import plotly.graph_objects as go
import dash
import dash_html_components as html
import dash_core_components as dcc
from dash.dependencies import Input, Output
# Read the airline data into the pandas dataframe
airline_data = pd.read_csv('https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-DV0101EN-SkillsNetwork/Data%20Files/airline_data.csv',