Skip to content

Instantly share code, notes, and snippets.

// ----- index.wxml
<!--index.wxml-->
<view class="container">
<view
class="usermotto"
style="position: absolute; left: {{left}}px; top: {{top}}px;"
bindtouchstart="touchStart"
bindtouchmove="touchMove"
bindtouchend="touchEnd"
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class RiverPodDemoPage extends ConsumerStatefulWidget {
@override
_RiverPodDemoPageState createState() => _RiverPodDemoPageState();
}
class _RiverPodDemoPageState extends ConsumerState<RiverPodDemoPage> {
@override
class _CustomColumnSeriesRenderer extends ColumnSeriesRenderer {
@override
ChartSegment createSegment() {
return _ColumnCustomPainter();
}
}
class _ColumnCustomPainter extends ColumnSegment {
Paint _fillPaint = Paint();
class _CustomLineSeriesRenderer extends ColumnSeriesRenderer {
@override
ChartSegment createSegment() {
return _ColumnLinePainter();
}
}
class _ColumnLinePainter extends ColumnSegment {
Paint _fillPaint = Paint();
import 'dart:async';
import 'package:flutter/services.dart';
class Flutterplugin17 {
static const MethodChannel _channel =
const MethodChannel('flutterplugin17');
static Future<String> get platformVersion async {
final String version = await _channel.invokeMethod('getPlatformVersion');
package com.lsl.flutterplugin17;
import android.util.Log;
import java.lang.reflect.Method;
/**
* Created by liusilong on 2020/5/9.
* version:1.0
* Describe:
package com.lsl.flutterplugin17;
import androidx.annotation.NonNull;
import io.flutter.embedding.engine.plugins.FlutterPlugin;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.PluginRegistry.Registrar;
@liusilong
liusilong / lock.java
Created December 29, 2019 09:13
Lock
public class Demo1 {
public static void main(String[] args) {
MyBouncedBuffered bouncedBuffered = new MyBouncedBuffered();
Thread putThread = new Thread(() -> {
while (true) {
String value = String.valueOf(new Random().nextInt(100));
try {
bouncedBuffered.put(value);
import 'package:flutter/material.dart';
class GetWidgetWidthAndHeiget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage(),
);
}
}
Stingy(
child: RaisedButton(
child: Text('Hello there..'),
onPressed: () {
print('It\'s been so long..');
},
)
)