Search
 
SCRIPT & CODE EXAMPLE
 

DART

flutter longpress vibration

import 'package:flutter/services.dart';

class MyVibrateButton extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: GestureDetector(
        onLongPress: () => HapticFeedback.vibrate(),
        child: Container(color: Colors.blue, width: 100.0, height: 50.0),
      ),
    );
  }
}
Comment

PREVIOUS NEXT
Code Example
Dart :: add sound to my flutter app 
Dart :: flutter: unhandled element defs; Picture key: AssetBundlePictureKey 
Dart :: random element from list dart 
Dart :: flutter force soft keyboard on widget 
Dart :: dart break double for loop 
Dart :: vxstate listen not working flutter 
Dart :: flutter thai language keyboard 
Dart :: Cannot remove from an unmodifiable list dart 
Dart :: Ascending order with for loop in dart 
Dart :: app bar for chat flutter 
Dart :: factory in dart 
Swift :: swiftui center image 
Swift :: conert data to string swift 
Swift :: swift uitableview cell spacing 
Swift :: swift get app version and build 
Swift :: stackoverflow get firbas analytics in ios 
Swift :: date in swiftui 
Swift :: get current unix timestamp swift ios 
Swift :: swift access appdelegate from viewcontroller 
Swift :: swipe to delete xcode 
Swift :: swift convert decimal to string 
Swift :: swift round double to 2 decimal places 
Swift :: listview swiftui 
Swift :: dismiss keyboard when tap outside swift 5 
Swift :: swift arrays 
Swift :: swift dictionary get key from valye 
Swift :: objective c vs swift 
Swift :: swift add navigation bar 
Swift :: debounce in swift 
Swift :: swift get keys from dictionary 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =