This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_screenutil/flutter_screenutil.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| //void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_screenutil/flutter_screenutil.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| //void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private func apiCalling(url: String,method: HTTPMethod,parameters: [String : Any]?,header: HTTPHeaders?, cachePolicy: Bool, completion: @escaping COMPLETION_HANDLER<Data>) { | |
| let configuration = URLSessionConfiguration.default | |
| configuration.requestCachePolicy = . reloadIgnoringLocalAndRemoteCacheData | |
| var req = URLRequest(url: URL(string: url)!) | |
| req.httpMethod = method.rawValue | |
| req.headers = API_HEADER | |
| req.cachePolicy = cachePolicy ? .returnCacheDataDontLoad : .reloadIgnoringLocalAndRemoteCacheData | |
| AF.request(req) | |
| .validate(statusCode: 200..<300) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let controller = UIHostingController(rootView: SwiftUIView()) | |
| self.navigationController?.pushViewController(controller, animated: true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension Array { | |
| func transtionDoctorTitle() -> String { | |
| let titles = self.map {changeLanguage.key(key: doctorData[$0 as! String] ?? changeLanguage.key(key: notGivenKey))} | |
| return titles.joined(separator: ", ") | |
| } | |
| } | |
| // DOWNLOAD IMAGE FROM URL | |
| extension UIImageView { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension UIImageView { | |
| func downloadImg(_ url: String) { | |
| let afterRemovedSpaceImgPath = url.replacingOccurrences(of: " ", with: "%20", options: .literal, range: nil) | |
| self.sd_imageIndicator = SDWebImageActivityIndicator.gray | |
| self.sd_setImage(with: URL(string: afterRemovedSpaceImgPath), placeholderImage: UIImage(named: "PlaceHolder")) | |
| } | |
| } |