mac에 폰열결하고 build시 observatory not discovered after 30 second. this is taking much longer than expected.. 후 

개발자를 확인 할수 없기때문에 iproxy... 라고 팝업이 뜬다면 

mac의 Launchpad - 시스템환경설정 - 보안 및 개인 정보 보호에서  다음에서 다운로한 앱 허용 아랫부분에 오른쪽에 허용 클릭 끝 

 

참고: https://www.androidhuman.com/2021-07-14-flutter_ios_iproxy

반응형

ios폴더로 이동 터미널에 cd ios

ios 폴더 안에 podfile.lock 삭제 

pod install --repo-update 입력

 

clean 한번하고 get 

 

반응형

 

connection = pymysql.connect(host='host', port=3306,
                             db='db', user='user',
                             passwd='pw', charset='utf8')
cursor = connection.cursor()

connection.ping(reconnect=True) # try reconnect


sql = f"REPLACE INTO item (name,price) VALUES (%s,%s)"
cursor.execute(sql, ("name","100"))
connection.commit()

connection.ping(reconnect=True)를 추가한다

 

반응형

'python > python' 카테고리의 다른 글

anaconda 파이썬 64bit 32bit 설치  (0) 2018.12.01
options = webdriver.ChromeOptions()
options.add_argument('headless')
    
options.add_argument("--start-maximized") # add
options.add_argument("--window-size=1920,1080") # add
    
dv = webdriver.Chrome(path, options=options)

 

반응형

'python > crawling' 카테고리의 다른 글

selenium login 403 , access denied  (0) 2021.08.11
beautiful soup 크롤링 안될때  (0) 2021.08.11

InvalidOperationException', reason: 'fb000000000 is not registered as a URL scheme. Please add it in your Info.plist'

에러가 뜰시

fb저 코드를 복사 한 후 

 

 

 

flutter - ios 오른쪽 클릭 -flutter - xocde 열기

runner - info - URL Types 클릭

 

 

 

+누른 후 URL Schemes에 오류에있던 fb0000값을 붙여넣으면 끝

 

 

반응형

our app is missing support for the following URL schemes 뜨면서 구글 로그인 안될때 

 

xcode 실행 (ios오른쪽버튼 - flutter - open ios module in xcode)

 

 

 

Runner - GoogleService-Info.plist - REVERSED_CLIENT_ID 값 복사 

 

 

 

 

Runner - Info - url types 열어서 + 추가하기 

 

 

 

 

 

 URL Schemes에 붙여넣기 하면 끝 

 

 

 

 

 

 

반응형

selenium 로그인이 안될때 

option = webdriver.ChromeOptions()
option.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36')

 

그래도 안될때 

option.add_argument('--disable-blink-features=AutomationControlled')
option.add_argument("--disable-extensions")
option.add_experimental_option('useAutomationExtension', False)
option.add_experimental_option("excludeSwitches", ["enable-automation"])

 

아래꺼 넣으니까 된다 

 

 

전체

 

option = webdriver.ChromeOptions()
option.add_argument('--no-sandbox')
option.add_argument("disable-gpu")
option.add_argument("--lang=ko_KR")
option.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36')
option.add_argument('--disable-blink-features=AutomationControlled')
option.add_argument("--disable-extensions")
option.add_experimental_option('useAutomationExtension', False)
option.add_experimental_option("excludeSwitches", ["enable-automation"])
driver = webdriver.Chrome(path, options=option)
driver.get("https://naver.com")

 

 

 

참고 :https://stackoverflow.com/questions/66989755/getting-403-when-using-selenium-to-automate-checkout-process

반응형

'python > crawling' 카테고리의 다른 글

selenium 사용중 option headless 추가시 에러날때  (0) 2021.08.18
beautiful soup 크롤링 안될때  (0) 2021.08.11
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36'}

res = requests.get(url,headers=headers)

요렇게 헤더를 넣는다 

반응형

'python > crawling' 카테고리의 다른 글

selenium 사용중 option headless 추가시 에러날때  (0) 2021.08.18
selenium login 403 , access denied  (0) 2021.08.11

기본 widget을 사용하다보면 영어로 되어있는것을 볼수 있다 .(ex)datepicker

바꿔보자

 

일단 pubspec.yaml의 디펜던시에 추가

dependencies:
  flutter:
    sdk: flutter
    
  flutter_localizations: //추가
    sdk: flutter//추가

 

 

 

 

 

main으로가서 

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "현지",
      localizationsDelegates: [ //추가
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: [ //추가
        const Locale('ko'),
      ],
    );
  }
}

 

 

 

 

widget들 변할걸 볼수있다 

반응형

'flutter > study' 카테고리의 다른 글

firebase dynamiclink 만들기  (0) 2023.03.03
google map 연동  (0) 2022.09.25
money comma  (0) 2021.11.05
TextField 사용시 바깥부분 터치시 focus 잃게하는방법  (0) 2021.07.28
app 이름 변경  (0) 2021.07.21

textField사용시 왠만하면 넣어야할듯 

 

최상위에 GestureDetector를 넣고 아래 내용 추가 

class Touch extends StatelessWidget {
  const Touch({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
        onTap: () {
          FocusScopeNode currentFocus = FocusScope.of(context);
          if (!currentFocus.hasPrimaryFocus) {
            currentFocus.unfocus();
          }
        },
        child: Scaffold()
    );
  }
}

or

SystemChannels.textInput.invokeMethod('TextInput.hide');

 

or 

 

추가

SingleChildScrollView( //or listview
              keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
              )

이놈을 넣으면 바깥쪽눌렀을때 바로 포커스를 잃지는않지만 스크롤시 잃는다 

 

참고 : https://flutterigniter.com/dismiss-keyboard-form-lose-focus/

반응형

'flutter > study' 카테고리의 다른 글

firebase dynamiclink 만들기  (0) 2023.03.03
google map 연동  (0) 2022.09.25
money comma  (0) 2021.11.05
flutter 현지화  (0) 2021.07.28
app 이름 변경  (0) 2021.07.21

+ Recent posts