Skip to main content

Posts

Referral & Deep linking

  Plugins :  app_links: android_play_install_referrer: Link to share :  https://play.google.com/store/apps/details?id=com.erer&referrer=referral_code%3DTEST123 Flutter Code :  import 'package:app_links/app_links.dart' ; import 'package:android_play_install_referrer/android_play_install_referrer.dart' ; import 'package:flutter/foundation.dart' ; import 'package:shared_preferences/shared_preferences.dart' ; class DeepLinkService {   static const String _referralKey = 'referral_code' ;   static final AppLinks _appLinks = AppLinks ();   static Future < void > initDeepLinks () async {     debugPrint ( 'Initializing deep links...' );     // 1️⃣ Handle real-time deep/link stream     try {       final Uri ? initialUri = await _appLinks . getInitialAppLink ();       if ( initialUri != null ) {         debugPrint ( 'Initial deep link: $initialUri'...

periodic

Stream . periodic ( Duration ( seconds : 1 )). takeWhile (( _ ) => myValue == null ). listen (     ( _ ) {       print ( "Value is still null, checking again..." );       if ( myValue != null ) {         print ( "Value is not null. Stopping periodic check." );         print ( "Method is called because value is not null." );       }     },   );  

Full Screenshot in Webview flutter

  import 'dart:convert' ; import 'dart:io' ; import 'dart:typed_data' ; import 'package:flutter/material.dart' ; import 'package:flutter_inappwebview/flutter_inappwebview.dart' ; import 'package:path_provider/path_provider.dart' ; class InAppWebViewExampleScreen extends StatefulWidget { @override _InAppWebViewExampleScreenState createState () => new _InAppWebViewExampleScreenState (); } class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> { late InAppWebViewController webView ; late Uint8List screenshotBytes ; @override void initState () { super .initState(); } @override void dispose () { super .dispose(); } @override Widget build (BuildContext context) { return Scaffold ( appBar: AppBar (title: Text ( "InAppWebView" )), body: Container ( child: Column (children: <Widget>[ Expanded ( child: InApp...

How to be a better salesperson

 ## Preparation: - Making the product good. - Gathering social proof. (Reviews, testimonials, case studies etc) - Free trial, low risk project, commission based. ## Emotion: - Dream or Fear. - Only works after preparation. ## Urgency/ Scarcity: - Price increasing to 5k tommorow. (1k current price) - Due to high demand, only 5 spots left! (1 spot filling out every minute)

which is better pdo or mysqli

 which is better pdo or mysqli The choice between PDO (PHP Data Objects) and MySQLi (MySQL Improved) largely depends on your specific needs and preferences for interacting with a database in PHP. Both are widely used for database interactions, but each has its strengths. Here’s a comparison of the two: 1. Database Support: PDO: Supports multiple database types (MySQL, PostgreSQL, SQLite, Oracle, etc.), making it more versatile if you plan to switch databases in the future. MySQLi: Specifically designed for MySQL databases. If you are only using MySQL and want to take full advantage of MySQL-specific features, MySQLi might be a better choice. 2. API Style: PDO: Object-oriented and supports both named and positional placeholders in prepared statements, which can help prevent SQL injection. MySQLi: Offers both an object-oriented and a procedural interface. This gives you flexibility based on your coding preferences. 3. Prepared Statements: PDO: Fully supports prepared statement...