Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

Dbank daisukenagata

:octocat:
Focusing
View GitHub Profile
@daisukenagata
daisukenagata / counter.dart
Last active Jun 7, 2022
One of the calculation methods of flutter
View counter.dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@daisukenagata
daisukenagata / callback.dart
Last active May 19, 2022
check call back
View callback.dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@daisukenagata
daisukenagata / get_textsize.dart
Created Apr 9, 2022
How to get the size of text
View get_textsize.dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@daisukenagata
daisukenagata / rideonthekeyboard.dart
Created Jan 17, 2022
Whenever I called Scaffold with Scaffold, I confirmed that Tab was on the Keyboard.
View rideonthekeyboard.dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
@override
View keyboardandtabbar.dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
@override
@daisukenagata
daisukenagata / AutoOpenTextField.swift
Last active Nov 28, 2021
AutoOpenTextField.swift
View AutoOpenTextField.swift
import SwiftUI
@available(iOS 15.0, *)
struct AutoOpenTextField: View {
@State private var name = ""
@FocusState var isFocused: Bool {
didSet {
DispatchQueue.main.async {
isFocused = true
View welcome.dart
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Welcome to Flutter',
home: new Scaffold(
View Mathematics.swift
import UIKit
class Pointted {
var horizonal: CGPoint
var vertical: CGPoint
init(h: CGPoint, v: CGPoint) {
horizonal = h
vertical = v
}
View Samplem4a.swift
//
// ViewController.swift
// Samplem4a
//
// Created by 永田大祐 on 2021/03/28.
//
import UIKit
import AVFoundation
View Get_DepthData.swift
import UIKit
import AVFoundation
class ViewController: UIViewController, AVCapturePhotoCaptureDelegate {
private var videoPreviewLayer: AVCaptureVideoPreviewLayer?
private var stillImageOutput = AVCapturePhotoOutput()
private var captureSession = AVCaptureSession()
private var capturepDevice: AVCaptureDevice?
private var session: AVCaptureSession?