TechHire NepalConnecting Talent, Building Careers
Find JobsCompaniesCourses
Find Talents
Sign inGet Started →
Find JobsCompaniesCourses
Find Talents
Sign inGet StartedHire Talent
TechHire Nepal

Nepal's #1 tech job platform. Connecting top talent with the best companies.

For Job Seekers

  • Browse Jobs
  • Companies
  • Tech Salaries
  • Interview Prep
  • Courses
  • Career Advice

For Employers

  • Post a Job
  • Talent Search
  • Pricing
  • Employer Dashboard

Company

  • About
  • Blog
  • Careers
  • Contact

Resources

  • Training Institutes
  • Projects
  • Tutorials
  • Roadmaps
  • Notes
  • Open Sources

Community

  • Discussions
  • Tech Events
  • Hackathons
  • Developer Meetups
  • Tech News

More

  • Help & Support
  • Salary Tax Calculator
  • Company Registration Guide
  • Labour Act

Stay in the loop

A weekly digest of the best tech articles and jobs in Nepal.

© 2026 TechHire Nepal. All rights reserved.

Privacy PolicyTerms of ServiceCookie Policy
HomeInterview PrepQuestion bank
Question bank

Interview Questions, Answered Clearly

Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.

Type
TechnicalCodingHR / BehaviouralAll types
Role
All rolesFrontend DeveloperBackend DeveloperFull-Stack DeveloperMobile Developer
Topic
All topicsJavaScript10React7HTML & CSS7PHP & Laravel9SQL & Databases6HTTP & REST APIs6Git4OOP & Design4Flutter5React Native5
Level
AnyEasyMediumHard

5 questions

  • Why they ask this: The first concept of every Flutter app; it shows you understand how the UI rebuilds.

    Answer

    • A StatelessWidget has no mutable state. Its build() output depends only on its constructor arguments (and inherited data such as the theme). Examples: a label or an icon button.
    • A StatefulWidget has a separate State object that lives across rebuilds. Calling setState() marks it dirty so build() runs again. Examples: a form, a counter, a tab view.
    text
    class Counter extends StatefulWidget {
      const Counter({super.key});
    
      @override
      State<Counter> createState() => _CounterState();
    }
    
    class _CounterState extends State<Counter> {
      int count = 0;
    
      @override
      Widget build(BuildContext context) {
        return TextButton(
          onPressed: () => setState(() => count++),
          child: Text('Tapped $count times'),
        );
      }
    }

    Use the State lifecycle methods: initState() for setup and dispose() to release controllers, streams and timers.

    Open full page
  • Why they ask this: A practical question that shows real hands-on Flutter experience.

    Answer

    • Hot reload injects your changed code into the running Dart VM and rebuilds the widget tree while keeping the app state (for example the current screen and form input). It takes about a second and is ideal for UI tweaks.
    • Hot restart reloads the code and restarts the app from main(), so all state is lost. It is still faster than a full rebuild.
    • A full restart (stop and run) is needed for native changes: new plugins with platform code, AndroidManifest.xml or Info.plist edits, and some asset changes.

    Hot reload will not pick up changes to main(), initState() logic that already ran, global or static variable initialisers, or enum and generic type changes. Use hot restart for those.

    Open full page
  • Why they ask this: There is no single right answer; interviewers want reasoning, not a favourite library.

    Answer

    • setState: local state inside one widget. Simple and perfectly fine for small screens.
    • InheritedWidget / ValueNotifier + ValueListenableBuilder: built into Flutter and lightweight.
    • Provider: wraps InheritedWidget. Good for simple app-wide state, such as the logged-in user or the theme.
    • Riverpod: a compile-safe evolution of Provider that does not depend on BuildContext. Good for async data and testing.
    • Bloc / Cubit: events and states in streams, with a strict separation between UI and logic. Popular in larger teams.
    • GetX: concise, but often criticised for mixing concerns.

    How to choose: keep state as local as possible. Pick a shared solution when several screens need the same data. Consider the team's experience, how testable it is, and how much boilerplate you can accept. Be ready to explain one approach in depth with code from a project you built.

    Open full page
  • Why they ask this: Misusing BuildContext causes common runtime errors, so this tests deeper Flutter knowledge.

    Answer

    A BuildContext is a handle to a widget's location in the widget tree (it is actually the widget's Element). It is used to look up the tree for inherited data and services:

    text
    final theme = Theme.of(context);
    final size = MediaQuery.sizeOf(context);
    Navigator.of(context).push(MaterialPageRoute(builder: (_) => const JobScreen()));
    ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Saved')));

    Common pitfalls:

    • Scaffold.of(context) fails if context belongs to a widget above the Scaffold. Wrap the child in a Builder to get a context below it.
    • After an await, the widget may have been removed. Check if (!context.mounted) return; before using the context again.
    Open full page
  • Why they ask this: Networking, databases and real-time features in Flutter depend on async Dart.

    Answer

    • A Future<T> delivers one value (or an error) later, such as an HTTP response. Use it with async/await or FutureBuilder.
    • A Stream<T> delivers many values over time, such as location updates, Firestore snapshots, WebSocket messages or user input. Use it with await for, listen() or StreamBuilder.
    text
    Future<List<Job>> fetchJobs() async {
      final res = await http.get(Uri.parse('https://api.example.com/jobs'));
      if (res.statusCode != 200) throw Exception('Failed: ${res.statusCode}');
      return (jsonDecode(res.body) as List).map((j) => Job.fromJson(j)).toList();
    }
    
    Stream<int> countdown(int from) async* {
      for (var i = from; i >= 0; i--) {
        await Future.delayed(const Duration(seconds: 1));
        yield i;
      }
    }

    Always cancel stream subscriptions in dispose() to avoid memory leaks.

    Open full page