Closed PaulD1980 closed 3 years ago
I don't have any plans as of right now, but pull requests are always welcome. Duplicate of #21.
For anyone still being interested in this... I digged into the braintree docs and found some easy solution which works at least for creditcards.
<script src="https://js.braintreegateway.com/web/dropin/1.33.0/js/dropin.js"></script>
3. Call this code from flutter and with the listener you can handle the none.
import 'dart:html' as html; import 'dart:js' as js; import 'dart:ui' as ui;
import 'package:flutter/material.dart';
const String viewID = "your-view-id";
class HtmlTryPage extends StatefulWidget { const HtmlTryPage({Key? key}) : super(key: key);
@override
State
class _HtmlTryPageState extends State
print(data);
});
}
@override Widget build(BuildContext context) { // ignore: undefined_prefixed_name ui.platformViewRegistry.registerViewFactory( viewID, (int id) => html.IFrameElement() ..width = MediaQuery.of(context).size.width.toString() ..height = MediaQuery.of(context).size.height.toString() ..src = 'assets/html/index.html' ..style.border = 'none');
return const SizedBox(
height: 500,
child: HtmlElementView(
viewType: viewID,
),
);
} }
Hope this helps someone :)
Does it support FLUTTER WEB or any future plans to support web?