Giter VIP home page Giter VIP logo

experiments_with_web's Introduction

HelloWaving hand animated gif I'm Aseem Wangoo

  • ๐Ÿ˜„ Pronouns: He/Him
  • โš’๏ธ Creator of FlatteredWithFlutter, FyndMyAI
  • ๐Ÿ”ˆ Event Speaker
  • โœ๏ธ Google Dev Library Contributor DevLibrary
  • ๐Ÿ“ซ How to reach me: Check social links below.

Watch, Like, Share, Enjoy

Aseem Wangoo | YouTube Aseem Wangoo | Twitter Aseem Wangoo | Blog Aseem Wangoo | Website Aseem Wangoo | DevTo Aseem Wangoo | LinkedIn Aseem Wangoo | BMC


๐ŸŒ Connect with Me!!!

LinkedIn Medium YouTube Twitter

๐Ÿ’ป Tech Stack:

Dart Kotlin Java JavaScript TypeScript Python AWS Firebase Google Cloud Flutter NodeJS React MongoDB Canva

๐Ÿ“Š GitHub Stats:



โœ๏ธ Quote of the day

Show โค๏ธ by starring repositories!

experiments_with_web's People

Contributors

aseemwangoo avatar aseemwangooai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

experiments_with_web's Issues

Shall we call method from js file in dart file?

for example

in example.js
`function alertMessage(text) {
alert(text)
}

window.logger = (flutter_value) => {
console.log({ js_context: this, flutter_value });
}`

main.dart
void main() {
js.context.callMethod('alertMessage', ['Flutter is calling upon JavaScript!']);
// var state = js.JsObject.fromBrowserObject(js.context['state']);
// print(state['hello']);

}

hello @AseemWangoo it is a really nice one to build flutter web, but how can i load dynamic url in iframe. in alert diaolg?

I tried this one.

// ignore: avoid_web_libraries_in_flutter
import 'dart:html';
import 'dart:ui' as ui;

import 'package:flutter/material.dart';

// ignore: must_be_immutable
class IframeView extends StatefulWidget {

String url;
IframeView(this.url);
@OverRide
_IframeViewState createState() => _IframeViewState();
}

class _IframeViewState extends State {
final IFrameElement _iframeElement = IFrameElement();

Widget _iframeWidget;

@OverRide
void initState() {
_iframeElement.height = '500';
_iframeElement.width = '500';
_iframeElement.src = widget.url;
_iframeElement.style.border = 'none';
// ignore: undefined_prefixed_name

ui.platformViewRegistry.registerViewFactory('iframeElement',
(int viewId) {

print('a');

return _iframeElement;
});

_iframeWidget = HtmlElementView(
key: UniqueKey(),
viewType: 'iframeElement',
);

super.initState();

}

@OverRide
Widget build(BuildContext context) {

// setState(() {
//   _iframeElement.src=widget.url;
// });
return Container( margin: EdgeInsets.only(top:50),child: _iframeWidget,
  
);

}
}

but it loads first loaded url again and again.

Url json

Hello friend, I saw your article on how to get a user's location...
a question, where does this json "https://geolocation-db.com/json/" come from?
is it your database?

Can I use it for something professional?

cant start because error PersistentHeaderShowOnScreenConfiguration not defined

cant start because error PersistentHeaderShowOnScreenConfiguration not defined

hello sir, i wanted to ask.. so i've try your repo which one is experiment with web. when i try to run it, it shown error and the error said

lib/app_level/widgets/dekstop/sliver_scaffold.dart

line 245 Error: Type 'PersistentHeaderShowOnScreenConfiguration' not found.
line 246 Error: The method 'PersistentHeaderShowOnScreenConfiguration' isn't defined for the class '_SliverDelegate'.

what should i do? tbh im new on flutter world. thanks

Mozilla GeoLocation not work

I try to use navigator.geolocation like this on my flutter web :

@JS('navigator.geolocation') // navigator.geolocation namespace
library jslocation; // library name can be whatever you want

import "package:js/js.dart";

@JS('getCurrentPosition') // Accessing method getCurrentPosition from       Geolocation API
external void getCurrentPosition(Function success(GeolocationPosition pos));

@JS()
@anonymous
class GeolocationCoordinates {
  external double get latitude;
  external double get longitude;
  external double get altitude;
  external double get accuracy;
  external double get altitudeAccuracy;
  external double get heading;
  external double get speed;

  external factory GeolocationCoordinates(
      {double latitude,
      double longitude,
      double altitude,
      double accuracy,
      double altitudeAccuracy,
      double heading,
      double speed});
}

@JS()
@anonymous
class GeolocationPosition {
  external GeolocationCoordinates get coords;

  external factory GeolocationPosition({GeolocationCoordinates coords});
}

And i use it :

  @override
  void initState() {
    super.initState();
    _getLocation();
  }

  Future _getLocation() async {
    if (kIsWeb) {
      print("-----> web js");
      getCurrentPosition(allowInterop((pos) => success(pos)));
    } }
  success(pos) {
    try {
      print(pos.coords.latitude);
      print(pos.coords.longitude);
      setState(() {
        _loading = false;
        print(
            '${widget.url}?BranchName=&latitude=${pos.coords.latitude}&longitude=${pos.coords.longitude}');
      });
    } catch (ex) {
      print("Exception thrown : " + ex.toString());
    }
  }

But success method never called?I check https://fir-signin-4477d.firebaseapp.com/#/location page and Mozilla GeoLocation is not work like me.
What is the problem?

This is my question on stackoverflow : https://stackoverflow.com/questions/64411270/flutter-web-get-location-on-web-by-location-plugin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.